[Tutor] thread not running

Evert Rol evert.rol at gmail.com
Mon Dec 10 15:15:20 CET 2007


> I have the following, which I use within a CherryPy app.  The  
> subprocess bit is just to see if it runs or not.   It works on my  
> home PC (Python 2.5.1 on Ubuntu), but not on the live host which  
> has Python 2.4.4 on Debian Etch.
>
>
>     def daemon():
>       while 1:
>          myperiodicfunction()
>          p = subprocess.Popen('cal > /tmp/stilhere.txt', shell=True)
>          time.sleep(30)
>
>     thread.start_new_thread(daemon,())
>
> Is there a way to get it to work without upgrading Python (which I  
> am not keen to do, as I prefer the packaged version & security  
> updates)

   Hi Ben,

What's going wrong when running it with 2.4? AfaIcs, all modules are  
in 2.4, so it my not have to do anything with the Python version, but  
with the underlying system. Any traceback? Perhaps replace the  
subprocess part with just a print statement to see what's happening?



More information about the Tutor mailing list