Re: sqlite utf8 encoding error

2005-11-18 Thread Manlio Perillo
return s # Register the converter with SQLite sqlite.register_converter("TEXT", convert_text) ...connect("...", detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES ) Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite utf8 encoding error

2005-11-19 Thread Manlio Perillo
pysqlite/doc/usage-guide.html Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Manlio Perillo
xx, in ? print data IOError: [Errno 12] Not enough space Can someone reproduce this bug? I begin to think that my system is messed up... Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Manlio Perillo
On Wed, 23 Nov 2005 14:59:45 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Manlio Perillo wrote: > >> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] >> on win32, Windows XP >> >> I have this problem: >> >>

Re: strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Manlio Perillo
also worked in IDLE. > >Jeff Thanks. So, it's seem to be a specific problem of Windows XP(?). Nobody can test it on a Windows 98/2000 machine? Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Manlio Perillo
On Wed, 23 Nov 2005 18:21:45 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Manlio Perillo wrote: > >> So, it's seem to be a specific problem of Windows XP(?). >> >> Nobody can test it on a Windows 98/2000 machine? > >works fine on assort

Re: strange behaviour when writing a large amount of data on stdout

2005-11-24 Thread Manlio Perillo
On Thu, 24 Nov 2005 05:22:18 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Wed, 23 Nov 2005 16:51:15 GMT, Manlio Perillo ><[EMAIL PROTECTED]> declaimed the following in >comp.lang.python: > >> So, it's seem to be a specific problem of Windows XP(?). &

Re: strange behaviour when writing a large amount of data on stdout

2005-11-24 Thread Manlio Perillo
On Thu, 24 Nov 2005 10:24:02 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Manlio Perillo wrote: > >> I have added a question mark... >> >> However: did you have installed SP1 or SP2? > >running XP without service packs is a really bad idea. y

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
nt the number of occurrences of movies titles in some text. Maybe lex is more optimized? Unfortunately is seems that there are no lex versions that generate python (or PyRex) code. Thanks and regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Accessing Python parse trees

2005-03-03 Thread Manlio Perillo
st): ... @parsing -> on_parsing some statement This will call on_parsing function with the AST object generated from the next statement: on_parsing(parser.suit(somestatement)) Thanks and regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
Hi. Python allows to subclass builtin classes but the Python Interpreter uses builtin types. As an example keyword arguments are inserted in a dict but I would like to use an user defined SortedDict. There are plans to add such a feature in a future version? Thanks and regards Manlio Perillo

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
Hi. Python allows to subclass builtin classes but the Python Interpreter uses builtin types. As an example keyword arguments are inserted in a dict but I would like to use an user defined SortedDict. There are plans to add such a feature in a future version? Thanks and regards Manlio Perillo

Re: Accessing Python parse trees

2005-03-05 Thread Manlio Perillo
fron dict and installing the class in the __builtin__ module (with the name 'dict') does not work, CPython uses only builtin types. With the compiler module I can obtain the keyword arguments in the order the were specified. The problem is how to do this for every call to foo! Thanks

Re: Accessing Python parse trees

2005-03-05 Thread Manlio Perillo
On Sat, 05 Mar 2005 08:52:38 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: >Manlio Perillo wrote: >> Anyway, here is an example of what I would like to do: >> >> #begin >> def foo(**kwargs): print kwargs >> >> foo(a = 1, b = 2, c = 3) >> #end

Re: writing a Mail Server

2005-12-14 Thread Manlio Perillo
ly appreciate the > input. > Thanks > Twisted. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

email package and line ending

2005-12-23 Thread Manlio Perillo
Regards. The problem is this code: >>> import email.Message >>> msg = email.Message.Message() >>> msg["subject"] = "email bug" >>> msg["from"] = "Manlio Perillo" >>> print repr(msg.as_string()) 'su

questions about locale and Windows

2005-12-23 Thread Manlio Perillo
ported locale setting Fortunately >>> locale.setlocale(locale.LC_ALL, '') 'Italian_Italy.1252' and locale.setlocale(locale.LC_ALL) 'C' works... Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

different versions for 2.3.4 documentation

2006-01-12 Thread Manlio Perillo
Regards. I'm only a bit curious, but why documentation from http://www.python.org/ftp/python/2.3.4/Python-2.3.4.tar.bz2 and http://www.python.org/ftp/python/doc/2.3.4/latex-2.3.4.tar.bz2 differ? Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Placing graphics & text on printed page - jan06call.jpg (0/1)

2006-01-12 Thread Manlio Perillo
ript file (with Ghostscript). Or you can use a more high level tool. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: different versions for 2.3.4 documentation

2006-01-13 Thread Manlio Perillo
Martin v. Löwis ha scritto: > Manlio Perillo wrote: > >>I'm only a bit curious, but why documentation from >>http://www.python.org/ftp/python/2.3.4/Python-2.3.4.tar.bz2 >>and >>http://www.python.org/ftp/python/doc/2.3.4/latex-2.3.4.tar.bz2 >>differ? >

Re: Socket Programming HOWTO example

2006-01-17 Thread Manlio Perillo
Steve Holden ha scritto: > [...] > I can see you have changed the example a little (because I know that > Gordon's original didn't have comments in Italian). The example cames from italian translation of the howto: http://python.it/doc/howto/Socket/sockets-it/sockets-it.html

Re: Making HTTP requests using Twisted

2006-07-11 Thread Manlio Perillo
Manlio Perillo ha scritto: > [...] > Here is a quick example, ABSOLUTELY NOT TESTED: > > class DownloadQueue(object): > SIZE = 50 > > def init(self): > self.requests = [] # queued requests > self.deferreds = [] # waiting requests >

Re: Making HTTP requests using Twisted

2006-07-11 Thread Manlio Perillo
deferred = getPage(url, timeout=timeout) self.deferreds.append(deferred) deferred.chainDeferred(deferredHelper) Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with email.Generator.Generator

2006-09-11 Thread Manlio Perillo
ayload = charset.body_encode(self._payload) File "C:\Python2.4\lib\email\Charset.py", line 366, in body_encode return email.base64MIME.body_encode(s) File "C:\Python2.4\lib\email\base64MIME.py", line 136, in encode enc = b2a_base64(s[i:i + max_unencoded]) UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 41: ordinal not in range(128) Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with email.Generator.Generator

2006-09-11 Thread Manlio Perillo
ixin, _MIMEMultipart.MIMEMultipart): def __init__(self): _MIMEMultipart.MIMEMultipart.__init__(self) This only accepts Unicode strings or plain ascii strings. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

__unicode__ method for exception object

2007-07-07 Thread Manlio Perillo
p_unicode slot (maybe it will be added in Python 3000?), however I think that the Base Exception class should implement the __unicode__ method. Any problems in doing so? I have not yet required this feature in the Python tracker. Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: __unicode__ method for exception object

2007-07-08 Thread Manlio Perillo
Il Sun, 08 Jul 2007 10:02:01 +1000, Ben Finney ha scritto: > Manlio Perillo <[EMAIL PROTECTED]> writes: > >> I have just noticed that exception objects does not handle well Unicode >> arguments. > > This error is unrelated to the fact that you created an exc

PyErr_NoMemory and multiple sub-interpreters

2007-12-11 Thread Manlio Perillo
Hi. Is it safe to use PyErr_NoMemory in a multi sub-interpreters environment? I have some doubts since PyErr_NoMemory uses a global variable: PyExc_MemoryErrorInst Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: High speed web services

2007-12-14 Thread Manlio Perillo
mperillo.ath.cx/nginx/mod_wsgi/ If your application is not I/O bound mod_wsgi for nginx can be a good solution, otherwise you should look for mod_wsgi for Apache. Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

pgasync

2006-04-28 Thread Manlio Perillo
Hi. Someone knows if this project is still alive? Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: python-dev Summary for 2006-02-16 through 2006-02-28

2006-04-29 Thread Manlio Perillo
erge changes from old and new versions of the original documentation to the translated one. see: http://svn.python.it/admin/branches/updates/examples/emailmessage.tex I hope this scripts can be useful, I'm thinking of releasing then as a separate package. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

SIGTERM handling

2006-05-05 Thread Manlio Perillo
blem is that SIGTERM causes the program to exit (without calling atexit registered functions). Why? In the MSDN documentations it is written that SIGTERM is by default ignored and in the Python documentation for signal module it is written that there should be no handler for SIGTERM. Thanks Man

[ANN] pykill32 0.2

2006-05-15 Thread Manlio Perillo
/svnroot/repos/pykill32/trunk Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

[ANN] pglib 0.1

2006-05-22 Thread Manlio Perillo
an be found at: http://developer.berlios.de/projects/pglib/ Unfortunately, I still have to write some documentation. However there is a (hopefully) detailed README and a test case. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Beta testers needed for a high performance Python application server

2008-03-26 Thread Manlio Perillo
/mod_wsgi/file/tip/examples/nginx-postgres- async.py http://hg.mperillo.ath.cx/nginx/mod_wsgi/file/tip/examples/nginx-curl.py Note that ngx.poll extension is still experimental. > [...] Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Beta testers needed for a high performance Python application server

2008-03-26 Thread Manlio Perillo
u should not use mod_python as an example. The WSGI module for Apache has a lot of feature for reducing these problems; and as an alternative you can use the WSGI implementation for Nginx. > [...] Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Very simple WSGI question

2008-11-22 Thread Manlio Perillo
ttp://hg.mperillo.ath.cx/wsgix/file/tip/wsgix/contrib/error_page.py This middleware enables the rendering of custom pages for HTTP error responses. > Matt Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

problem with internationalized headers in email package

2008-06-29 Thread Manlio Perillo
x27;=?utf-8?b?QW5kcsOoIDxhbmRyZUBsb2NhbGhvc3Q+?=' I'm not sure if this can be considered a bug, but surely this is an invalid header. Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list