Re: Very simple WSGI question

2008-11-22 Thread Manlio Perillo
/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
this is an invalid header. Thanks 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
/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
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: High speed web services

2007-12-14 Thread Manlio Perillo
solution, otherwise you should look for mod_wsgi for Apache. Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

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: __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 exception object. No, it is related. e

__unicode__ method for exception object

2007-07-07 Thread Manlio Perillo
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: Problems with email.Generator.Generator

2006-09-11 Thread Manlio Perillo
\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
. Regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Making HTTP requests using Twisted

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

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 def addRequest(self, url, timeout

[ANN] pglib 0.1

2006-05-22 Thread Manlio Perillo
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

[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

SIGTERM handling

2006-05-05 Thread Manlio Perillo
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 Manlio Perillo -- http

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

2006-04-29 Thread Manlio Perillo
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

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: 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 Regards Manlio

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? It appears that the latex-* set really comes from

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
. 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()) 'subject: email bug\nfrom: Manlio Perillo\n\n' Why line ending is '\n' and not '\r\n' ? RFC 2822 says

questions about locale and Windows

2005-12-23 Thread Manlio Perillo
(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

Re: writing a Mail Server

2005-12-14 Thread Manlio Perillo
SimpleSocketServer. I am not clear about how it will get an email type file and then put it in the right mailbox. I don't need to do too much fancy address checking, spam filtering etc. Is there a simple way to approach this? Will really appreciate the input. Thanks Twisted. Regards Manlio

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(?). Pardon? I think the prior respondent said

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. you're not telling me that you haven't updated, are you? I

strange behaviour when writing a large amount of data on stdout

2005-11-23 Thread Manlio Perillo
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: n = 61409 + 1 data = 'x' * n print data Traceback (most recent call last

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

2005-11-23 Thread Manlio Perillo
. 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 assorted XP and 2000 boxes for me. That's very strange. is the n = 61409

Re: sqlite utf8 encoding error

2005-11-19 Thread Manlio Perillo
as sqlite def adapt_str(s): # if you have declared this encoding at begin of the module return s.decode(iso-8859-1) sqlite.register_adapter(str, adapt_str) Read pysqlite documentation for more informations: http://initd.org/pub/software/pysqlite/doc/usage-guide.html Regards Manlio Perillo

Re: Accessing Python parse trees

2005-03-05 Thread Manlio Perillo
(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 and regards Manlio Perillo -- http://mail.python.org/mailman/listinfo/python

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 In the current implementation kwargs is a dict, but I need

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
depends on the word. As an example I would like to count 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

Accessing Python parse trees

2005-03-03 Thread Manlio Perillo
- 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