Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-18 Thread Joseph Turian
> Here's what I see: > * If I use logging to write the output, I don't see any output in the > server log, but the client gets correct results. > * If I use sys.stderrto write the output, I don't see any output in > the server log AND the client gets INcorrect results. > * If I use sys.stdout to w

Re: SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-18 Thread Joseph Turian
> > I was having a mysterious problem with SimpleXMLRPCServer. (I am using > > Python 2.5.2) > > I'd start updating Python to the latest 2.5 release: 2.5.4 Ubuntu doesn't have 2.5.4. :( > > The request handlers were sometimes failing without any error message > > to the log output. > > > What I d

SimpleXMLRPCServer clobbering sys.stderr? (2.5.2)

2009-10-17 Thread Joseph Turian
I was having a mysterious problem with SimpleXMLRPCServer. (I am using Python 2.5.2) The request handlers were sometimes failing without any error message to the log output. What I discovered was perplexing. I had some 'print' statements in the handers that, assuming the request would be handled,

Abort SimpleXMLRPCServer request prematurely?

2009-06-29 Thread Joseph Turian
With SimpleXMLRPCServer, if the server is taking too long, how can I use the client to kill the request and have the server abort prematurely? Thanks, Joseph -- http://mail.python.org/mailman/listinfo/python-list

Re: handeling very large dictionaries

2009-06-28 Thread Joseph Turian
You could also try using a key-value store. I am using pytc, a Python API for Tokyo Cabinet. It seems to figure out quite nicely when to go to disk, and when to use memory. But I have not done extensive tests. Here is some example code for using pytc: http://github.com/turian/pytc-example/tree/m

Re: Find more than one error at once

2008-05-10 Thread Joseph Turian
On May 10, 8:13 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > What kind of errors? Syntax-errors? Then use one of the python source > code analyzers, such as pylint or pychecker. Great! -- http://mail.python.org/mailman/listinfo/python-list

Re: Property in derived class

2008-05-10 Thread Joseph Turian
On May 9, 9:05 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > Using the overridable property recipe [1], > [1]http://infinitesque.net/articles/2005/enhancing%20Python's%20property... Thanks, this is a great solution! Joseph -- http://mail.python.org/mailman/listinfo/python-list

Find more than one error at once

2008-05-09 Thread Joseph Turian
Is it possible to coax python to find more than one error at once? Thanks, Joseph -- http://mail.python.org/mailman/listinfo/python-list

Property in derived class

2008-05-09 Thread Joseph Turian
If I have a property in a derived class, it is difficult to override the get and set functions: the property's function object had early binding, whereas the overriden method was bound late. This was previously discussed: http://groups.google.com/group/comp.lang.python/browse_thread/thread/e13a

Re: Python 2.5 adoption

2008-04-18 Thread Joseph Turian
Basically, we're planning on releasing it as open-source, and don't want to alienate a large percentage of potential users. -- http://mail.python.org/mailman/listinfo/python-list

Python 2.5 adoption

2008-04-18 Thread Joseph Turian
How widely adopted is python 2.5? We are doing some development, and have a choice to make: a) Use all the 2.5 features we want. b) Maintain backwards compatability with 2.4. So I guess the question is, does anyone have a sense of what percent of python users don't have 2.5? Thanks, Joseph --

Re: Python code for 2.5 and 2.4?

2008-02-25 Thread Joseph Turian
On 25 fév, 16:02, Robert Kern <[EMAIL PROTECTED]> wrote: > Joseph Turian wrote: > > I was given code that was written for python 2.5, and uses simple > > functions like 'all' which are not present in 2.4 > > > I want to make the code 2.4 compatible. What is

Python code for 2.5 and 2.4?

2008-02-25 Thread Joseph Turian
I was given code that was written for python 2.5, and uses simple functions like 'all' which are not present in 2.4 I want to make the code 2.4 compatible. What is the best way to do this? If I define function 'all', then won't I break 2.5 compatability? Thanks, Joseph -- http://mail.python.or

Wrap a dictionary in a class?

2006-03-22 Thread Joseph Turian
In another thread, it was recommended that I wrap a dictionary in a class. How do I do so? Joseph that thread: http://groups.google.com/group/comp.lang.python/browse_frm/thread/9a0fbdca450469a1/b18455aa8dbceb8a?q=turian&rnum=1#b18455aa8dbceb8a -- http://mail.python.org/mailman/listinfo/pytho

Re: Importing two module variables and having one clobber the other?

2006-03-21 Thread Joseph Turian
Fredrik Lundh wrote: > if you prefer to use a "parameters.value" syntax, you can wrap the resulting > dictionary in a class. That sounds good. How do I do that? > I assume "from" means "beneath" and "getcwd" means "walk" ? Actually: def superdirs(d): lst = [d] while d != os.environ["HOME"]

Importing two module variables and having one clobber the other?

2006-03-21 Thread Joseph Turian
Can I simulate the behavior of "from foo import *" using imp.load_module()? Here's the functionality I need: We allow the user to define parameter values, which are imported and can be accessed directly as variables within Python. These are defined in "parameters.py". More specifically, let's sa

Safest manner to extend search path for modules?

2005-07-25 Thread Joseph Turian
Hi, What is the safest manner to extend search path for modules, minimizing the likelihood of shooting oneself in the foot? The system (which includes scripts and their shared modules) may be checked out in several different locations, but a script in a particular checked-out version of the syste

Re: Fuzzy matching of postal addresses

2005-01-23 Thread Joseph Turian
Andrew, > Basically, I have two databases containing lists of postal addresses and > need to look for matching addresses in the two databases. More > precisely, for each address in database A I want to find a single > matching address in database B. What percent of addresses in A have a unique co