Understanding the Pystone measurement

2011-03-24 Thread tleeuwenb...@gmail.com
Hi there, Is there a good writeup of what the pystone measurement actually means? I'm working on benchmarking of some Python code at work, and I'm interested in how Pystone might be relevant to me. I've tried googling, but I can't find any introductory / definitional descriptions of what this

Working on Python benchmarking

2011-03-12 Thread tleeuwenb...@gmail.com
Hi there... I'm working on a package to provide python benchmarking (profiling and analysis over time). The idea is to provide a decorator which can be applied to unit tests which will cause the system to be profiled while running those tests. The idea would be that any existing set of unit tests

Question regarding multiprocessing and error: Can't pickle type 'instancemethod': attribute lookup __builtin__.instancemethod failed

2009-10-13 Thread tleeuwenb...@gmail.com
Hi all, Thanks in advance for any suggestions. I'm getting the following: Exception in thread Thread-1: Traceback (most recent call last): File /work/tjl/apps/lib/python2.6/threading.py, line 525, in __bootstrap_inner self.run() File /work/tjl/apps/lib/python2.6/threading.py, line 477,

Problem with multiprocessing

2009-09-02 Thread tleeuwenb...@gmail.com
I have a problem using multiprocessing in a simple way. I created a file, testmp.py, with the following contents: --- import multiprocessing as mp p = mp.Pool(5) def f(x): return x * x print map(f, [1,2,3,4,5]) print p.map(f, [1,2,3,4,5])

Multithreading / multiprocess

2009-04-11 Thread tleeuwenb...@gmail.com
Is there anyway to begin a thread and execute a finite number of lines of code, or a finite amount of time within it? For example, say I create three child threads and I want to guarantee equal timeshare between them, can I specify a quanta (say 400 LOC although I know that is pretty small) to

TypeError: object cannot be interpreted as an index

2009-04-08 Thread tleeuwenb...@gmail.com
It started with this error message... TypeError: object cannot be used as an index foo = {} someObject = someClass() foo[someObject] = hello Obviously, there are some known reasons why objects may not be indexes, such as if they are not hashable (as in the case of lists). However, I'm not

People working in AI using Python

2009-03-02 Thread tleeuwenb...@gmail.com
Hi all, I work on a natural language generation system for weather forecasting, using Python. I would like to find out if there is an active Python AI SIG or whether there is sufficient interest in forming one. Please email me offline (tleeuwenb...@gmail.com) if you're interested in touching

Unit tests / build tools

2008-12-14 Thread tleeuwenb...@gmail.com
Hi all, I don't know if there is an equivalent to Maven for Python, or whether Maven could be used for Python projects. However, it would be great if there were something available that would let me produce unit test and code coverage statistics, then have those presented through an attractive