[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl
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

[issue7370] BaseHTTPServer reinventing rfc822 date formatting

2013-02-25 Thread karl
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

[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl
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

[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl
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

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2013-02-25 Thread karl
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

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-21 Thread Karl Bicker
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

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-20 Thread Karl Bicker
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

[issue15799] httplib client and statusline

2012-08-30 Thread karl
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

[issue15799] httplib client and statusline

2012-08-28 Thread karl
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

[issue15799] httplib client and statusline

2012-08-28 Thread karl
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

[issue15799] httplib client and statusline

2012-08-28 Thread karl
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

[issue504714] hasattr catches only AttributeError

2012-07-16 Thread Karl Chen
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

Issues with `codecs.register` and `codecs.CodecInfo` objects

2012-07-06 Thread Karl Knechtel
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,

Re: append method

2012-05-23 Thread Karl Knechtel
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

Re: print XML

2012-05-19 Thread Karl Knechtel
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

Re: Dealing with the __str__ method in classes with lots of attributes

2012-05-14 Thread Karl Knechtel
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

Re: Good data structure for finding date intervals including a given date

2012-05-14 Thread Karl Knechtel
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

Re: dynamically selecting a class to instantiate based on the object attributes.

2012-05-14 Thread Karl Knechtel
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

Fwd: Newbie naive question ... int() throws ValueError

2012-05-12 Thread Karl Knechtel
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

Re: Good data structure for finding date intervals including a given date

2012-05-12 Thread Karl Knechtel
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? --

Re: Dealing with the __str__ method in classes with lots of attributes

2012-05-12 Thread Karl Knechtel
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

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Karl Knechtel
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. --

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Karl Knechtel
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

Re: File traversing

2012-04-16 Thread Karl Knechtel
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

Fwd: Python one-liner?

2012-04-16 Thread Karl Knechtel
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),

[Windows] drag-and-drop onto .py file in modern versions?

2012-04-12 Thread Karl Knechtel
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

Re: is this foolish?

2012-04-12 Thread Karl Knechtel
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:

[issue13294] http.server - HEAD request when no resource is defined.

2011-11-12 Thread karl
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

[issue13295] html5 template for Lib/http/server.py

2011-10-31 Thread karl
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

[issue13295] html5 template for Lib/http/server.py

2011-10-31 Thread karl
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

[issue13294] http.server - HEAD request when no resource is defined.

2011-10-30 Thread karl
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

[issue13295] html5 template for Lib/http/server.py

2011-10-30 Thread karl
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

[issue3581] failures in test_uuid

2011-07-26 Thread Karl Johan Kleist
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

[issue3581] failures in test_uuid

2011-07-26 Thread Karl Johan Kleist
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

[issue3581] failures in test_uuid

2011-07-26 Thread Karl Johan Kleist
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

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread karl
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

newbie question

2011-04-01 Thread Karl
, 3, ... Thanks! Karl-- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2011-04-01 Thread Karl
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

[issue2193] Cookie Colon Name Bug

2011-01-29 Thread karl
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

[issue2193] Cookie Colon Name Bug

2011-01-05 Thread karl
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

[issue2193] Cookie Colon Name Bug

2011-01-05 Thread karl
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

[issue2193] Cookie Colon Name Bug

2011-01-04 Thread karl
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

[issue2193] Cookie Colon Name Bug

2011-01-04 Thread karl
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

[issue6098] xml.dom.minidom incorrectly claims DOM Level 3 conformance

2010-10-14 Thread karl
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

[issue5762] AttributeError: 'NoneType' object has no attribute 'replace'

2010-10-14 Thread karl
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

[issue1675951] [gzip] Performance for small reads and fix seek problem

2009-12-22 Thread Karl D'Adamo
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

[issue6414] struct module : processor endianness descriptions misleading

2009-07-04 Thread Karl Magdsick
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

Re: installation in mac os x

2009-06-24 Thread Karl Jansson
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

timeit and __future__

2009-06-19 Thread Karl Chen
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__

installation in mac os x

2009-06-10 Thread Karl Jansson
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

[issue3791] bsddb not completely removed

2009-03-30 Thread karl
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

socket.getaddrinfo: flags |= AI_ADDRCONFIG

2008-11-05 Thread Karl Chen
applies if you explicitly choose AF_INET6, a conscious decision.) Karl -- http://mail.python.org/mailman/listinfo/python-list

deleting an object

2008-09-25 Thread Karl Kobata
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)

member functions in a class

2008-09-18 Thread Karl Kobata
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

fwd: member functions in a class

2008-09-18 Thread Karl Kobata
from libname from *. Thanks karl -- http://mail.python.org/mailman/listinfo/python-list

Re: ka-ping yee tokenizer.py

2008-09-17 Thread Karl Kobata
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

RE: ka-ping yee tokenizer.py

2008-09-16 Thread Karl Kobata
( 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

Re: Issue with inspect module

2008-04-19 Thread Karl-Heinz Ruskowski
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

Re: manipulating class attributes from a decorator while the class is being defined

2008-04-19 Thread Karl-Heinz Ruskowski
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

Re: python setup.py install on Vista?

2008-04-18 Thread Karl-Heinz Ruskowski
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,

Re: Another MySQL Images Question

2008-04-18 Thread Karl-Heinz Ruskowski
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 --

[issue2010] Link to howto section on re module documentation incorrect

2008-02-04 Thread Karl Norby
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

[Help]UnicodeDecodeError

2007-03-18 Thread Karl
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

Re: why I don't like range/xrange

2007-02-16 Thread Samuel Karl Peterson
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

Re: Parsing HTML

2007-02-11 Thread Samuel Karl Peterson
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

Re: How to find all the same words in a text?

2007-02-11 Thread Samuel Karl Peterson
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):

Re: How to find all the same words in a text?

2007-02-11 Thread Samuel Karl Peterson
[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

Re: No module named pyExcelerator Error

2007-02-11 Thread Samuel Karl Peterson
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

string.replace non-ascii characters

2007-02-11 Thread Samuel Karl Peterson
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

Re: About getattr()

2007-02-11 Thread Samuel Karl Peterson
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

Re: searching a list of lists as a two-dimensional array?

2007-02-11 Thread Samuel Karl Peterson
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

Re: string.replace non-ascii characters

2007-02-11 Thread Samuel Karl Peterson
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

Re: PyThreadState_SetAsyncExc (nThreadId ??????, exc);

2006-12-14 Thread Karl H.
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

Re: What are python closures realy like?

2006-12-02 Thread Karl Kofnarson
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

What are python closures realy like?

2006-12-01 Thread Karl Kofnarson
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

Backup Mailman?

2006-10-30 Thread Karl Groves
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

__delitem__ affecting performance

2006-10-19 Thread Karl H.
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

ANN: pyXSD 0.1 released

2006-09-12 Thread Karl Norby
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

Re: Calling GPL code from a Python application

2006-01-04 Thread Karl A. Krueger
*. 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

Re: Calling GPL code from a Python application

2006-01-03 Thread Karl A. Krueger
*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

Re: Software licenses and releasing Python programs for review

2005-06-02 Thread 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

2D vector graphics Problem

2005-05-29 Thread Karl Max
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

Re: 2D vector graphics Problem

2005-05-29 Thread Karl Max
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

Re: Regular Expressions - Python vs Perl

2005-04-21 Thread Karl A. Krueger
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

Re: lambda closure question

2005-02-22 Thread Karl Anderson
: 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

<    1   2   3