[Tutor] how to make a script do two things at once.

nephish nephish at xit.net
Sun Aug 21 23:23:20 CEST 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
shawn




More information about the Tutor mailing list