RE: Socket Performance

2008-03-13 Thread Brian Smith
[EMAIL PROTECTED] wrote: > Sent: Wednesday, March 12, 2008 9:47 PM > To: python-list@python.org > Subject: Socket Performance > > Can anyone explain why socket performance (throughput) varies > depending on the amount of data send and recv are called with? > > For example: try creating a local c

RE: anydbm safe for simultaneous writes?

2008-02-28 Thread Brian Smith
Chris wrote: > I need simple data persistence for a cgi application that > will be used potentially by multiple clients simultaneously. > So I need something that can handle locking among writes. > Sqlite probably does this, but I am using Python 2.4.4, which > does not include sqlite. The d

RE: Large file support >2/4GB ?

2008-02-25 Thread Brian Smith
Chris wrote: > On Feb 25, 12:35 pm, robert <[EMAIL PROTECTED]> wrote: > > Somebody who uses my app gets a error : > > > > os.stat('/path/filename') > > > > OSError: [Errno 75] Value too large for defined data type: > > '/path/filename' > > > > on a big file >4GB > > > > ( Python 2.4.4 / Linux ) > >

RE: Is there a way to "link" a python program from several files?

2008-02-16 Thread Brian Smith
Diez B. Roggisch wrote: > Brian Smith wrote: > > I would be interested in a program that can combine > > multiple modules into a single module, which removes > > all the inter-package imports and fixes other > > inter-module references, like Haskell > > All-

RE: Is there a way to "link" a python program from several files?

2008-02-16 Thread Brian Smith
Diez B. Roggisch wrote: > Edward A. Falk schrieb: > > IOW, is there a "linker" for python? I've written a > > program comprised of about five .py files. I'd like to > > find a way to combine them into a single executable. > > Obviously, I could hand-edit them into a single > > .py file, but I'm

FW: apache/mod_wsgi daemon mode

2008-02-03 Thread Brian Smith
Also, mod_wsgi has its own mailing list: http://groups.google.com/group/modwsgi > Scott SA wrote: > I am trying to configure mod_wsgi to run in daemon mode with Apache. I > can easily get it to run 'normally' under Apache but I obtain > permission errors _or_ process-failures in daemon mode. Spe

RE: [XML-SIG] SAX characters() output on multiple lines for non-ascii

2008-02-02 Thread Brian Smith
> def characters(self, chars): > > newchars=[] > newchars.append(chars.encode('ISO-8859-1')) The SAX parser calls characters() multiple times for the same text block. For example, in the input 123, characters() could be called once: handler.characters("123") or twice:

RE: HTTP POST uploading large files

2008-01-20 Thread Brian Smith
Wolfgang Draxinger wrote: > The problem is, that videos, by nature are rather big files, > however urllib2 wants it's Request objects being prepared > beforehand, which would mean to first load the whole file to memory. Try using mmap. Here is some untested code: map = mmap(file.fileno(

RE: Some Berkeley DB questions (being maintained? queries?)

2008-01-17 Thread Brian Smith
[EMAIL PROTECTED] wrote: > 1. Now that Berkeley DB is part of Oracle, is it still being > maintained? Is it free? Berkeley DB is owned by Oracle, but it is seperate from the Oracle RDBMS product. Yes, it is free. > 2. Are there good python libraries for bdb available, that > are being maintai

RE: "env" parameter to "popen" won't accept Unicode on Windows -minor Unicode bug

2008-01-15 Thread Brian Smith
Diez B. Roggisch wrote: > Sure thing, python will just magically convert unicode to the > encoding the program YOU invoke will expect. Right after we > introduced the > > solve_my_problem() > > built-in-function. Any other wishes? There's no reason to be rude. Anyway, at least on Windows it m

RE: xml-filter with XMLFilterBase() and XMLGenerator() shuffles attributes

2007-12-20 Thread Brian Smith
> > I want prevent it from shuffling attributes, i.e. preserve original > > file's attribute order. Is there any ContentHandler.features* > > responsible for that? > > I suspect not. attrs is a dictionary which does not maintain > order, and XML attributes are unordered to begin with. Is > t