MemoryError in imaplib?

2010-02-13 Thread Márcio Faustino
Hi, When using "imaplib" to fetch e-mail messages, the "IMAP4_SSL.read" and "IMAP4_SSL.readline" functions sometimes throw a "MemoryError" exception in "chunks.append(data)" and "line.append(char)", respectively. But if I change those functions to use instead a "cStringIO" buffer object, then that

Re: Extracting zip files containing directories with ZipFile

2009-04-12 Thread Márcio Faustino
On Apr 12, 5:01 pm, MRAB wrote: > Strictly speaking, zip files don't contain nested folders, but only a > flat list of files. Didn't know that, thanks. On Apr 12, 8:01 pm, "Martin v. Löwis" wrote: > That depends on the version of Python you are using. > Seehttp://bugs.python.org/4710 Thanks.

Extracting zip files containing directories with ZipFile

2009-04-12 Thread Márcio Faustino
Hi, Does the ZipFile class correctly handles directories contained within zip files? For example, calling "extractall" on an archive with only "folder/ file.txt" in it results in an IOError saying "No such file or directory" for "./folder/file.txt", because it created a file named "folder" instea

Re: Using percent signs with SafeConfigParser

2009-04-11 Thread Márcio Faustino
On 11 Abr, 20:06, Peter Otten <__pete...@web.de> wrote: > I think you are right. Please file a bug report . I will. > IMO this doesn't fix the problem because > > (1) it allows "%%%" which is also incorrect You're right, how about this one "(? (2) _interpvar_re has already butchered values like

Using percent signs with SafeConfigParser

2009-04-11 Thread Márcio Faustino
Hi, Does the SafeConfigParser class correctly detects lone percent signs? For example, shouldn't the string "100%%" be accepted as a valid value? Executing the code below should only print one error, instead it prints 2. (I've tested this with version 2.6.1 on Windows XP.) It seems the "_badperce

Re: Lambda forms and scoping

2009-03-21 Thread Márcio Faustino
On Mar 20, 12:28 pm, "R. David Murray" wrote: > Hope this helps.  I find that thinking in terms of namespaces helps > me understand how Python works better than any other mental model > I've come across. It does, thanks. On Mar 20, 12:41 pm, Michele Simionato wrote: > This post http://www.artim

Re: Lambda forms and scoping

2009-03-20 Thread Márcio Faustino
So simple :) thanks! -- http://mail.python.org/mailman/listinfo/python-list

Lambda forms and scoping

2009-03-19 Thread Márcio Faustino
Hi, Executing the example below doesn't produce the expected behavior, but using the commented code does. Is this normal, or is it a problem with Python? I've tested it with version 2.6.1 on Windows XP. Thanks, -- from abc import * from types import * import re class Base (ObjectType): __m

Re: Public imports

2008-12-08 Thread Márcio Faustino
So, no chance of doing this: # "A.py" from __future__ import division, with_statement # "B.py" from A import * print 1 / 2 ...and printing 0.5, right? Too bad :) Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Public imports

2008-12-08 Thread Márcio Faustino
Hi, Does Python support public imports instead of the default private? Something like D's "public import" (see ) or even Perl's "export_to_level". Thanks, -- http://mail.python.org/mailman/listinfo/python-list