karl added the comment:
http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.1
quoting from HTTP 1.1 bis
Prior to 1995, there were three different formats commonly used by
servers to communicate timestamps. For compatibility with old
implementations, all three
karl added the comment:
I think it is now fixed by my patch in http://bugs.python.org/issue747320
--
nosy: +karlcow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7370
karl added the comment:
Made a mistake in the previous server.patch, use server.2.patch
--
Added file: http://bugs.python.org/file29241/server2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue747320
Changes by karl karl+pythonb...@la-grange.net:
Removed file: http://bugs.python.org/file29240/server.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue747320
karl added the comment:
This is a possible additional example for set_tunnel, modification of
python3.3/html/_sources/library/http.client.txt
Hope it helps.
--
nosy: +karlcow
Added file: http://bugs.python.org/file29243/http.client.patch
___
Python
Karl Bicker added the comment:
Actually, I would like to check if the threads working on the queue are still
alive.
However, it occurs to me now that I would need a facility to distinguish
between a timeout and an actual join. Unfortunately, my original patch does not
provide this, one
New submission from Karl Bicker:
The multiprocessing.JoinableQueue's function join() should have a timeout
argument so that one can check on other things while waiting for a queue to
finish.
As join() uses a condition to wait anyway, a timeout is easily implemented and
passed
karl added the comment:
So what do we do with it?
Do I created a patch or do we close that bug? :)
No hard feelings about it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15799
New submission from karl:
The current parsing of HTTP status line seems strange with regards to its
definition in HTTP.
http://hg.python.org/cpython/file/3.2/Lib/http/client.py#l307
Currently the code is
version, status, reason = line.split(None, 2)
status1 = HTTP/1.1 200 OK
status2
karl added the comment:
ok.
status lines 1 and 2 are valid.
the third one is invalid and should trigger a
raise BadStatusLine(line)
The code at line 318 is bogus as it will parse happily the third line without
raising an exception.
http://hg.python.org/cpython/file/3.2/Lib/http/client.py
karl added the comment:
Fair enough, it could be a warning when
* more than one space in between http version and status code
* if there is a missing space after the status code
I'm not advocating for being strict only. I'm advocating for giving the tools
to developer to assess that things
Karl Chen qu...@09e0.clgubaohtf.z.quarl.org added the comment:
For the record, this was eventually fixed for Python 3.2. See
http://bugs.python.org/issue9666.
Adding this here because issue504714 comes up earlier than issue9666 in many
web searches.
--
nosy: +quarl
Hello all,
While attempting to make a wrapper for opening multiple types of
UTF-encoded files (more on that later, in a separate post, I guess), I
ran into some oddities with the `codecs` module, specifically to do
with `.register` ing `CodecInfo` objects. I'd like to report a bug or
something,
On Wed, May 23, 2012 at 8:23 AM, 水静流深 1248283...@qq.com wrote:
s=[1,2,3]
s.append(5)
s
[1, 2, 3, 5]
s=s.append(5)
s
print s
None
why can't s=s.append(5) ,what is the reason?
For the same reason that you don't see `[1, 2, 3, 5]` immediately
after doing `s.append(5)` the first time
What do you want the contents of the file to look like? Why are you
parsing the XML in the first place? (What do you want to happen if the
data on `sys.stdin` isn't actually valid XML?)
On Thu, May 17, 2012 at 9:52 AM, Nibin V M nibi...@gmail.com wrote:
Hello,
I have the following code, which
On Sat, May 12, 2012 at 9:10 AM, Ethan Furman et...@stoneleaf.us wrote:
Firstly, __slots__ is a tuple.
I object: conceptually, the slots of a class are set in stone, but
the `__slots__` attribute of a class object is just an attribute, and
any iterable (as long as it yields valid identifier
On Sat, May 12, 2012 at 10:18 AM, Jean-Daniel
jeandaniel.bro...@gmail.com wrote:
Since you say intervals in plural here, I assume that they can overlap?
Yes,
For instance, there are the following intervals :
[[1, 10],
[4, 7],
[6, 15],
[11, 17]]
asking for the intervals including 5, the
On Wed, May 9, 2012 at 7:02 AM, J. Mwebaze jmweb...@gmail.com wrote:
During object instantiaton, i would like to use the specific class, that
corresponds to the version of the class that was used to create the object.
I don't understand; the version of the class that was used to create
I really wish gmail picked up the mailing list as a default reply-to address...
-- Forwarded message --
From: Karl Knechtel zahl...@gmail.com
Date: Sat, May 12, 2012 at 8:25 AM
Subject: Re: Newbie naive question ... int() throws ValueError
To: Devin Jeanpierre jeanpierr
On Sat, May 12, 2012 at 8:17 AM, Jean-Daniel
jeandaniel.bro...@gmail.com wrote:
I am looking for a fast way to find the intervals
containing a given date, without having to check all intervals (less
than O(n)).
Since you say intervals in plural here, I assume that they can overlap?
--
On Thu, May 10, 2012 at 9:33 AM, Andreas Tawn andreas.t...@ubisoft.com wrote:
And there's also something like...
return \n.join((: .join((str(k), str(self.__dict__[k]))) for k in
self.__dict__))
which is a nice length, but I lose control of the order of the attributes and
the formatting
On Thu, Apr 19, 2012 at 3:28 PM, dmitrey dmitre...@gmail.com wrote:
hi all,
can I somehow overload operators like =, - or something like
that? (I'm searching for appropriate overload for logical implication
if a then b)
Thank you in advance, D.
--
On Fri, Apr 20, 2012 at 12:43 AM, Chris Angelico ros...@gmail.com wrote:
On Fri, Apr 20, 2012 at 2:38 PM, alex23 wuwe...@gmail.com wrote:
On Apr 20, 5:54 am, Jacob MacDonald jaccar...@gmail.com wrote:
On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote:
can I somehow overload
On Sun, Apr 15, 2012 at 5:51 AM, Chris Angelico ros...@gmail.com wrote:
(You may also want to consider using the 'with' statement to guarantee
a timely closing of the file. Outside the scope of this mail though.)
I think this list is just to collect unique entries, yes? If so, a set
may be
On Sat, Apr 14, 2012 at 7:26 AM, Tim Chase
python.l...@tim.thechases.com wrote:
On 04/13/12 22:54, Chris Angelico wrote:
Yes, that would be the right method to use. I'd not bother with the
function and map() though, and simply iterate:
d = {}
for val in l:
d.setdefault(f(val),
Hello all,
Back when I had 2.6.x installed, I used to be able to drag a file onto a
.py file in order to open it with that script (rather, pass the name of the
file as `sys.argv[1]`). I did nothing special to make this work, as far as
I can recall; it was something that the installer set up
On Thu, Apr 12, 2012 at 7:15 AM, Tim Golden m...@timgolden.me.uk wrote:
On 12/04/2012 10:35, Cameron Simpson wrote:
I've found myself using a Python gotcha as a feature.
Have a look at Peter Inglesby's lightning talk from a
recent London Python Dojo:
karl karl+pythonb...@la-grange.net added the comment:
Eric,
Two possible solutions to explore:
Either the HEAD reports exactly the same thing than a GET without the body,
because it is the role of the GET, but that means indeed adding support for the
HEAD.
or creating a catch-all answer
karl karl+pythonb...@la-grange.net added the comment:
Ezio, Martin,
HTML 3.2, HTML 4.01 are not outdated. They have stable specifications. That
said their doctypes have not influence at all in browsers. The html5 doctype
!DOCTYPE html has been chosen because it was the minimal string
karl karl+pythonb...@la-grange.net added the comment:
Yup. I doesn't bring anything except putting the output in line with the
reality of browsers implementations. You may close it. I don't mind.
--
___
Python tracker rep...@bugs.python.org
http
New submission from karl karl+pythonb...@la-grange.net:
A very simple HTTP server
#!/usr/bin/python3
import http.server
from os import chdir
# CONFIG
ROOTPATH = '/Your/path/'
PORT = 8000
# CODE
def run(server_class=http.server.HTTPServer,
server_handler=http.server.SimpleHTTPRequestHandler
New submission from karl karl+pythonb...@la-grange.net:
The code has a set of old HTML templates. Here is a patch to change it to very
simple html5 templates.
--
components: Library (Lib)
files: server-html5.patch
keywords: patch
messages: 146641
nosy: karlcow, orsenthil
priority
Karl Johan Kleist karl.jo...@kleist-it-consulting.de added the comment:
If it could be of interest to anybody:
When running make test after building Python 2.7.2, I get the error message
1 test failed: test_uuid.
uname -a
Linux h1488277 2.6.18-028stab091.2 #1 SMP Fri Jun 3 00:02:40 MSD 2011
Karl Johan Kleist karl.jo...@kleist-it-consulting.de added the comment:
== CPython 2.7.2 (default, Jul 26 2011, 12:29:47) [GCC 4.2.1 (SUSE Linux)]
== Linux-2.6.18-028stab091.2-i686-athlon-with-SuSE-10.3-i586 little-endian
== /home/kjk/local/src/Python-2.7.2/build/test_python_18037
Testing
Karl Johan Kleist karl.jo...@kleist-it-consulting.de added the comment:
/sbin/ifconfig -a | grep -i -e hwaddr -e ether
venet0Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
venet0:0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
karl karl+pythonb...@la-grange.net added the comment:
@Luke
did you have the opportunity to look at
http://greenbytes.de/tech/webdav/rfc6265.html
If there is something which doesn't match reality in that document that would
be cool to have feedback about
, 3, ...
Thanks!
Karl--
http://mail.python.org/mailman/listinfo/python-list
Ah, all right. Thank you very much, eryksun!
On 2011-04-01 22:48:44 +0200, eryksun () said:
Regarding the format of your post, please use plain text only.
On Friday, April 1, 2011 3:52:24 PM UTC-4, Karl wrote:
aList = [0, 1, 2, 3, 4]
bList = [2*i for i in aList]
sum = 0
for j in bList:
sum
karl karl+pythonb...@la-grange.net added the comment:
@aclover
see my comment http://bugs.python.org/issue2193#msg125423
Adam Barth is working for Google on Chrome.
The RFC being written is made in cooperation with other browser developers.
If you have comments about this RFC you are welcome
karl karl+pythonb...@la-grange.net added the comment:
John: Ah sorry, if I misunderstood. The bug seems to say that it is about the
Cookie Name and legal chars for this cookie name. What I was trying to say is
that the processing of the Cookie Name is different depending if you are a
client
karl karl+pythonb...@la-grange.net added the comment:
agreed. :)
Then my question about parsing rules for libraries. Is interoperability a plus
here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2193
karl karl+pythonb...@la-grange.net added the comment:
The rules for parsing and setting the cookies are different. Server should
always produce strict cookies only. So the production rules are to be done
accordingly to the specification.
Adam Barth is working right now on an update
karl karl+pythonb...@la-grange.net added the comment:
Ah the server is back the rules for the User Agents are defined here
http://tools.ietf.org/html/draft-ietf-httpstate-cookie#section-5
--
___
Python tracker rep...@bugs.python.org
http
karl karl+pythonb...@la-grange.net added the comment:
The source of 3.1/lib/python3.1/xml/dom/__init__.py is correct
===
minidom -- A simple implementation of the Level 1 DOM with namespace
support added (based on the Level 2 specification) and other
minor Level 2
karl karl+pythonb...@la-grange.net added the comment:
This following markup creates the mistake as described earlier in the comments
element xmlns=
b class=foo alt=/
/element
This markup doesn't
element xmlns=bla
b class=foo alt=/
/element
It returns
?xml version=1.0 ?element xmlns=bla
b
Karl D'Adamo karld-pyt...@ofb.net added the comment:
This patch is awesome. It makes it possible to do this with http
response objects that return gzipped streams:
conn = httplib.HTTPConnection('blah')
req = conn.request('GET', 'a.gz')
resp = conn.getresponse()
unzipper = gzip.GzipFile
New submission from Karl Magdsick kmagds...@hotmail.com:
In http://docs.python.org/dev/library/struct.html,
it says
Native byte order is big-endian or little-endian, depending on the host
system. For example, Motorola and Sun processors are big-endian; Intel
and DEC processors are little
What happens if you work on the commandline (Terminal)?
Python2.6 should be available from (out of my head)
/Library/Frameworks/Python.framework/Versions/2.6/bin/python
If that's working, it is successfully installed.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
If I work
I wanted to time something that uses with_statement, in python2.5.
Importing __future__ in the statement or the setup doesn't work
since it's not the beginning of the code being compiled. Other
than using a separate module, I could only come up with this:
timeit.template = 'from __future__
Hi,
I was doing the tutorial at http://www.python.org/doc/current/
tutorial/, and I came across some code that did not work, and I got
the following error: AttributeError: 'str' object has no attribute
'format'.
So I downloaded a .dmg of python 2.6.2 and then I installed it. But
karl karl+pythonb...@la-grange.net added the comment:
On the mac version there is an issue with the python version installed
by default.
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
File
/System/Library/Frameworks/Python.framework/Versions
applies if you
explicitly choose AF_INET6, a conscious decision.)
Karl
--
http://mail.python.org/mailman/listinfo/python-list
Please help. Questions based on snippet of code below.
1) when myTestCase is deleted, is just the pointer deleted or the
entire instance with all of its data and data structure deleted?
2) What is the practice for deleted the object and recovering the
memory it occupies?
3)
I am new to python and am wondering. When I create a class, with 'def'
functions and if this class is instantiated say 50 times. Does this mean
that all the 'def' functions code within the class is duplicated for each
instance?
Can someone give me a short and simple answer as to what happens in
from libname from *.
Thanks
karl
--
http://mail.python.org/mailman/listinfo/python-list
Aaran,
Thanks for your input. Your examples gave me other alternatives for what I
wanted to do and it seems to work.
Thanks all for your help.
On Sep 16, 2:48 pm, Karl Kobata karl.kob... at syncira.com
http://mail.python.org/mailman/listinfo/python-list wrote:
Hi Fredrik
( modifyLine( myFileHandle ) ):
Print token
Anxiously looking forward to your thoughts.
karl
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Fredrik Lundh
Sent: Monday, September 15, 2008 2:04 PM
To: python-list@python.org
Subject: Re: ka-ping yee
Why does the inspect module cause the output
to be printed twice?
I also tested it, no problem here either.
--
http://mail.python.org/mailman/listinfo/python-list
How can I reach the class attribute `regexps' from within a decorator?
Now, the first way that comes to my mind is simply overloading the class and
set your regexps variable in your new class.
The other way is to create an object and set it more manually (obj.regexps =
['.*']). Which for me
hi
well using windows vista, where the h*** am i supposed to type this?
you have to include the path to the python interpreter like this
c:\programs\python\python.exe pythonfile.py
(replace this with your path)
or you set an alias called python - i don't know how to that under windows,
Hi,
cursor.execute('update products set pic1=%s where id=%s, ;',
(pic1, id))
Shouldn't it be something like
cursor.execute('update products set pic1=%s where id=%s, ;' % (pic1, id))
--
GPG key: 0x04B3BB96
pgpiL4LACYHv7.pgp
Description: PGP signature
--
New submission from Karl Norby:
The link on http://docs.python.org/lib/re-syntax.html; to the HOWTO
section of documentation redirects incorrectly to
http://docs.python.org/dev/howto/index.html/;. It should be
http://docs.python.org/dev/howto/; or
http://docs.python.org/dev/howto/index.html
error msg:
Mod_python error: PythonHandler mod_python.publisher
Traceback (most recent call last):
File /usr/lib/python2.3/site-packages/mod_python/apache.py, line
299, in HandlerDispatch
result = object(req)
File /usr/lib/python2.3/site-packages/mod_python/publisher.py,
line 136, in
Roel Schroeven [EMAIL PROTECTED] on Sat, 17 Feb 2007
01:31:13 GMT didst step forth and proclaim thus:
...
So, the point is that in C you can influence the loop's behavior by
modifying the loop variable, while you cannot do that in Python (at
least not in a for-loop).
What's wrong with...
for
mtuller [EMAIL PROTECTED] on 10 Feb 2007 15:03:36 -0800 didst
step forth and proclaim thus:
Alright. I have tried everything I can find, but am not getting
anywhere. I have a web page that has data like this:
[snip]
What is show is only a small section.
I want to extract the 33,699 (which
Johny [EMAIL PROTECTED] on 10 Feb 2007 05:29:23 -0800 didst step
forth and proclaim thus:
I need to find all the same words in a text .
What would be the best idea to do that?
I make no claims of this being the best approach:
def findOccurances(a_string, word):
[EMAIL PROTECTED] on 11 Feb 2007 08:16:11 -0800 didst step
forth and proclaim thus:
More concisely:
import re
pattern = re.compile(r'\b324\b')
indices = [ match.start() for match in
pattern.finditer(target_string) ]
print Indices, indices
print Count: , len(indices)
Thank you, this
susan [EMAIL PROTECTED] on 11 Feb 2007 16:55:35 -0800 didst
step forth and proclaim thus:
Hi,
I'm new of Python, and this problem stucked me whole day but can't be
solved.
[snip]
anybody can tell me where's wrong please? Thanks in advance!
What are the contents of sys.path from an
Greetings Pythonistas. I have recently discovered a strange anomoly
with string.replace. It seemingly, randomly does not deal with
characters of ordinal value 127. I ran into this problem while
downloading auction web pages from ebay and trying to replace the
\xa0 (dec 160, nbsp char in
Jm lists [EMAIL PROTECTED] on Mon, 12 Feb 2007 12:36:10
+0800 didst step forth and proclaim thus:
Hello,
Since I can write the statement like:
print os.path.isdir.__doc__
Test whether a path is a directory
Why do I still need the getattr() func as below?
print
James Stroud [EMAIL PROTECTED] on Sun, 11 Feb 2007 16:53:16 -0800
didst step forth and proclaim thus:
agent-s wrote:
Basically I'm programming a board game and I have to use a list of
lists to represent the board (a list of 8 lists with 8 elements each).
I have to search the adjacent cells
Steven Bethard [EMAIL PROTECTED] on Sun, 11 Feb 2007 22:23:59
-0700 didst step forth and proclaim thus:
Samuel Karl Peterson wrote:
Greetings Pythonistas. I have recently discovered a strange anomoly
with string.replace. It seemingly, randomly does not deal with
characters of ordinal
such a parameter.
Use the thread_id member of the PyThreadState object:
PyThreadState *tstate;
PyThreadState_SetAsyncExc(tstate-thread_id,exc);
-Karl
--
http://mail.python.org/mailman/listinfo/python-list
Karl,
Usually when using this idiom, fun_basket would return a tuple of all of the
defined functions, rather than one vs. the other. So in place of:
if f == 1:
return f1
if f == 2:
return f2
Just do
return f1, f2
(For that matter, the argument f is no longer
Hi,
while writing my last program I came upon the problem
of accessing a common local variable by a bunch of
functions.
I wanted to have a function which would, depending on
some argument, return other functions all having access to
the same variable. An OO approach would do but why not
try out
Does anyone out there know of a utility that will allow you to backup
Mailman (including the subscribers and all messages)?
TIA
--
Karl Groves
www.karlcore.com
--
http://mail.python.org/mailman/listinfo/python-list
it would affect
performance. Overriding other sequence operators like __delslice__ does
not exhibit this behavior.
The speed difference doesn't really bother me, but I am curious.
I used Python 2.4 for this test.
-Karl
--
http://mail.python.org/mailman/listinfo/python-list
pyXSD v.0.1 has been released! pyXSD is a tool to map XML and XSD (XML Schema) into Python. It can validate an XML file against an XSD file. It also contains a feature to allow users to easily transform an XML file, using small python classes that are easy to use and are easy and fast for users to
*.
An analogous provision exists in U.S. law, indeed in the same chapter
cited above. It also covers copies made in the course of repairing a
computer.
--
Karl A. Krueger [EMAIL PROTECTED] { s/example/whoi/ }
--
http://mail.python.org/mailman/listinfo/python-list
*exempting* the running
of software (and the making of backups) from copyright protection. That
is, copyright does *not* grant the holder the right to restrain users
from executing a copy of software that they have legally obtained.
http://www.copyright.gov/title17/92chap1.html#117
--
Karl A. Krueger
firm looking to
own and sell the software restrictively, then they don't want those
terms. But if they're just looking to use it privately and internally,
I'm curious how the GPL would get in the way of that.
--
Karl A. Krueger [EMAIL PROTECTED] { s/example/whoi/ }
--
http://mail.python.org
Hi all,
I'm new here. Name's Max from tuscany, and I don't speak english very well
:-) I am not veteran at coding, I am most like an artisan coder since
commodore 64 times.
Now the problem:
I would like to have a little 2d engine to calculate and trace segments and
poly's and their
Scott David Daniels [EMAIL PROTECTED] ha scritto nel messaggio
news:[EMAIL PROTECTED]
x = x * cos - y * sin - xRel * cos + yRel * sin + xRel
y = x * sin + y * cos - xRel * sin - yRel * cos + yRel
self.coords = (x,y)
Your equation for y uses the new x, not the old x.
De hi hi ho. I must
non-Perl languages, which don't use libpcre.
An example is CL-PPCRE (http://www.weitz.de/cl-ppcre/), which claims to
be more compatible with the regex semantics of Perl 5.8.0 than, say,
Perl 5.6.1 is.
--
Karl A. Krueger [EMAIL PROTECTED] { s/example/whoi/ }
--
http://mail.python.org/mailman
:
self.doTestItemStateTrans(ig_name, tt_name))
setattr(klass, test_name, test_fun)
--
Karl Anderson [EMAIL PROTECTED] http://monkey.org/~kra/
--
http://mail.python.org/mailman/listinfo/python-list
201 - 285 of 285 matches
Mail list logo