is there a posh Win32 binary? or, compiling with MS 2005 Express...

2007-09-28 Thread Ray Schumacher
Is there a posh Win32 binary? Or better, has anyone successfully compiled modules for Python 2.4 with the newest "free" tools? Do I need to move to 2.5? I could not get it to compile with my (apparently incomplete) MS C++ 7.1 install (which did, however, work for weave/blitz, before). The 7.1 co

threads - was:Is there a way to protect a piece of critical code?

2007-01-14 Thread Ray Schumacher
"Hendrik van Rooyen" wrote: > Similarly discrete background thread jobs can be used > in a functional style this way: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491280 > ( an alternative for the laborious OO-centric threading. With the various options available, many of which I

Re: multi-threaded webcam with SimpleAsyncHTTPServer.py (updated)

2007-01-08 Thread Ray Schumacher
Better asyncore.loop use. Also fixes a late bug in my first post of code: PILFile.seek(0) needed since PIL.save does not reset the pointer. class ImageServer(RequestHandler): def __init__(self, conn, addr, server): asynchat.async_chat.__init__(self,conn) self.client_addres

Re: multi-threaded webcam with SimpleAsyncHTTPServer.py

2007-01-08 Thread Ray Schumacher
>>Question, though: how can I unblock asyncore.loop(), or at least be >>able to interrupt it? >Why do you want to do that? I was then thinking along the lines of a Netmeeting/visual chat program, rather than a daemon-type server, where one might want to terminate more quickly. Searching furth

multi-threaded webcam with SimpleAsyncHTTPServer.py

2007-01-07 Thread Ray Schumacher
The class seems to work pretty well - very basic and fast, it just serves images from the specified port and camera device (USB cam). I added an ImageServer class and some code to __main__ class ImageServer(RequestHandler): def __init__(self, conn, addr, server): asynchat.async_chat.

Re: Python-list Digest, Vol 39, Issue 465

2006-12-29 Thread Ray Schumacher
At 10:50 AM 12/29/2006, you wrote: In addition to what Chris said, is there a reason why you're reinventing the wheel instead of using available components? Hi Carsten, The eventual goal here is towards a streaming two-way server, which wouldn't use the http, but something more like RTP/RTCP/H.3

how to serve image files without disk use?

2006-12-28 Thread Ray Schumacher
I'm trying to make a small camera server using VideoCapture.py and socket. I needed to construct a complete image file with headers etc for a browser to recognize it, but I couldn't find a combination of StringIO and wx image methods to avoid disk saves, without PIL. If I save a temp.jpg file t

Python and real-time OS timing/task communication?

2006-07-24 Thread Ray Schumacher
Has anyone used Python and a hard real-time OS/patch to schedule timed events? We have started in on Debian and RTAI, and may be using LXRT. (I've been reading http://people.mech.kuleuven.be/~psoetens/lxrt/portingtolxrt.html) I was envisioning that we really only need a separate RT-process in C us

"parent" in a class __init__ def?

2006-06-10 Thread Ray Schumacher
ly one class: port = LXSerial.LXSerial(...) My rationale of putting one class in its own module is to minimize giant module files with lots of long classes; I see only a remote possibility that someone would want call a class without most of the others as well. Ray Ray Schumacher wrote: > > What

Re: Python-list Digest, Vol 33, Issue 159

2006-06-10 Thread Ray Schumacher
rial.LXSerial(...) My rationale of putting the class in its own module is to minimize giant module files with lots of long classes; there is only a remote possibility that someone would want call a class without most of the others as well. Ray Ray Schumacher wrote: > > What is the feeli

from foo imprt * in package __init__ ?

2006-06-10 Thread Ray Schumacher
What is the Pythonic-ness of using from foo imprt * in a package's __init__.py? I import my own (~8) module files in the package this way, and import standard modules with "import bar". Ray -- http://mail.python.org/mailman/listinfo/python-list

"parent" in a class __init__ def?

2006-06-10 Thread Ray Schumacher
What is the feeling on using "parent" in a class definition that class methods can refer to, vs. some other organization ? Should all relevant objects/vars just be passed into the method as needed? It seems like including "parent" in the class def is just like a class variable, which most do not

Re: [Py2exe-users] py2exe 0.6.2 released

2005-09-07 Thread Ray Schumacher
1.html#exhibit-a filled out so that it includes the py2exe home, as well as Python, probably. It could be put in the Zip or Rar to be viewed on extraction. Does this sound correct? Ray Schumacher -- http://mail.python.org/mailman/listinfo/python-list

is there better 32 clock() timing?

2005-01-23 Thread Ray Schumacher
I have a need for a time.clock() with >0.16 second (16us) accuracy. The sleep() (on Python 2.3, Win32, at least) has a .001s limit. Are they lower/better on other's platforms? Test code, 2.4GHz P4 Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 import time t0