| | |
how to do two things at once?
Thread Solved |
•
•
Join Date: Jun 2005
Posts: 39
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- Things you should know before installing SP2 for Windows XP (Windows NT / 2000 / XP)
- system restarts by itself...and more weird things (Windows NT / 2000 / XP)
- Can i do these 2 things? (Windows NT / 2000 / XP)
- Can't right-click some things with SP2 (Windows NT / 2000 / XP)
- Some suspicous things to look at in you HJT log (Viruses, Spyware and other Nasties)
- How do you add things to startup (Windows NT / 2000 / XP)
- Weird Things Happening... (Windows NT / 2000 / XP)
Other Threads in the Python Forum
- Previous Thread: How to use 'top' using Python
- Next Thread: Need help with a simple python program
| Thread Tools | Search this Thread |
accessdenied advanced aliased argv beginner bits calling casino change changecolor clear command convert corners count csv cturtle cursor def definedlines dictionary digital dynamic dynamically enter event events external file float format frange function google homework i/o iframe import input jaunty java keyboard lapse line linux list lists loop matching microphone mouse multiple newb number numbers obexftp output parameters parsing path port prime programming projects py py2exe pygame pyopengl python random rational raw_input recursion return scrolledtext signal simple singleton skinning sprite string strings tails text threading time tlapse tuple tutorial ubuntu unicode urllib urllib2 valueerror variable voip web-scrape whileloop word wxpython






