Re: Threading - will threads run in parallel?

2006-03-01 Thread Mc Osten
On 28 Feb 2006 11:20:05 -0800, SolaFide wrote: (get() is a function which waits for a ping on a specific port, thus stopping the program for a while.) It's a busy wait? -- USB Priests for only 10$ -- http://mail.python.org/mailman/listinfo/python-list

Threading - will threads run in parallel?

2006-02-28 Thread SolaFide
I have 2 threads that I want to run at the same time: for instance: from threading import Thread class test(Thread): def run(self): while True: get(asdf) class test2(Thread): def run(self): while True:

Re: Threading - will threads run in parallel?

2006-02-28 Thread Ido Yehieli
Also, is it possible to split off a program for the terminal that started it? As in I type in python test.py and test.py runs in the background and lets me do other things in that terminal? try: python test.py -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading - will threads run in parallel?

2006-02-28 Thread Rene Pijlman
SolaFide: (get() is a function which waits for a ping on a specific port, thus stopping the program for a while.) Will these run together, Thread 2 can run while thread 1 is blocked for I/O and v.v. Also, is it possible to split off a program for the terminal that started it? As in I type in

Re: Threading - will threads run in parallel?

2006-02-28 Thread SolaFide
Thanks! The problem is on Windows: when I run c:\python24\myprogram.py, it has a command window open up. If I close it, the program ends. So I want it to run without opening that window. -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading - will threads run in parallel?

2006-02-28 Thread Jarek Zgoda
SolaFide napisaƂ(a): The problem is on Windows: when I run c:\python24\myprogram.py, it has a command window open up. If I close it, the program ends. So I want it to run without opening that window. Give it .pyw extension or start using pythonw.exe instead of python.exe. -- Jarek Zgoda