how to do two things at once?

Thread Solved

Join Date: Jun 2005
Posts: 39
Reputation: nephish is an unknown quantity at this point 
Solved Threads: 0
nephish nephish is offline Offline
Light Poster

how to do two things at once?

 
0
  #1
Aug 21st, 2005
Hey there,
i have a simple question about getting a script to do
two things at once.
like this.


for i in range(100):
print i
time.sleep(.2)
if i == 15:
os.system('python /home/me/ipupdate.py')
print 'done'

when i run this, it stops at 15 and runs the script called out in the os.system line. i know it is supposed to do that. But, how could i get a script to do this without stopping the count (or delaying it unill the script called exits) I don' t have to run it this way, i can import it if necessary as a module. or whatever will work so i can execute two things at once.

thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,959
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 918
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: how to do two things at once?

 
0
  #2
Aug 22nd, 2005
Look in your Python documentation under thread or threading.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 39
Reputation: nephish is an unknown quantity at this point 
Solved Threads: 0
nephish nephish is offline Offline
Light Poster

Re: how to do two things at once?

 
0
  #3
Aug 22nd, 2005
threading, yep. going to take some time to learn this. but appears to be what i need.
thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC