python asp page keeps state across queries !?!?

2005-08-23 Thread nicolas_riesch
I am writing asp pages in python, running on IIS 5 on Windows. I notice that variables outside functions keep their value across queries. I don't know if it is normal. Here is a little script that demonstrates it: -- problem.asp - <[EMAIL PROTECTED]> <% try

Re: literal accented characters in python asp page with Microsoft IIS

2005-08-23 Thread nicolas_riesch
I've tried it, but I still get this message from IIS : HTTP/1.1 500 Server Error -- http://mail.python.org/mailman/listinfo/python-list

literal accented characters in python asp page with Microsoft IIS

2005-08-22 Thread nicolas_riesch
I try to use python as the language in an asp page with Microsoft IIS 5.0. I have these two files, req_bad.asp and req_ok.asp -- req_bad.asp - <[EMAIL PROTECTED]> <% # il y a un problème ici Response.write('Hello') %> - -- req_ok.asp --

Re: COM access sooo slow !?

2005-08-22 Thread nicolas_riesch
I also use Python to access database on Windows. You can speed up your program by doing that: Open PythonWin, then click on the "Tools" menu and the item "COM Makepy Utility". It will display all libraries available. Then, select "Microsoft ActiveX Data Objects 2.7 Library" or whatever last versio

Re: how to write thread-safe module ? and pytz

2005-08-14 Thread nicolas_riesch
Thank you very much for all your explanation ! Your pytz module is great ! -- http://mail.python.org/mailman/listinfo/python-list

how to write thread-safe module ? and pytz

2005-08-10 Thread nicolas_riesch
Does someone know if the module pytz (http://sourceforge.net/projects/pytz/) is thread-safe ? I have not seen it explicitely stated, and just wanted to be sure, as I want to use it. That's because in the file pytz/tzinfo.py, I see global variables _timedelta_cache, _datetime_cache, _ttinfo_cache,

Re: Syntax error after upgrading to Python 2.4

2005-08-10 Thread nicolas_riesch
[EMAIL PROTECTED] wrote: > additive = self.additive, > ^ > SyntaxError: invalid syntax > I'm using Windows XP and Python 2.4.1 > > Any ideas? O:-) I had a similar problem with python 2.4.1. When I imported some module, I got a Sy

Re: codecs.getencoder encodes entire string ?

2005-07-29 Thread nicolas_riesch
Thank you very much ! Nicolas -- http://mail.python.org/mailman/listinfo/python-list

codecs.getencoder encodes entire string ?

2005-07-28 Thread nicolas_riesch
When I use an encoder function from codecs module, documentation says that it encodes the object input and returns a tuple (output object, length consumed). >>> import codecs >>> enc=codecs.getencoder('iso-8859-1') >>> enc(u'asdf') ('asdf', 4) >>> I just don't understand why it returns the "leng