[Tutor] (no subject)

Roberts, Alice ARoberts at ambac.com
Mon Oct 31 19:16:21 CET 2005


Hi,

 

My os.system() isn't waiting for exit status, jumping right into next
os.system().

 

import os

 

DIR = 'v:/pam/batch/ambac/'

CMD1 = DIR + 'Prices_Prep.cmd'

CMD2 = DIR + 'positions.cmd'

CMD3 = DIR + 'ftp_hub.cmd'

CMD4 = DIR + 'import_prices.cmd'

 

try:

    

    os.system(CMD1)

    

 

except IOError, (errno, strerror):

    print " E/S(%s): %s" % (errno, strerror)

 

#result=os.system

#    print result

 

try:

 

    os.system(CMD2)

 

except IOError, (errno, strerror):

    print " E/S(%s): %s" % (errno, strerror)    

 

#result=os.system

#    print result

 

try:

 

    os.system(CMD3)

 

except IOError, (errno, strerror):

    print " E/S(%s): %s" % (errno, strerror)    

 

#result=os.system

#    print result

 

try:

 

    os.system(CMD4)

 

except IOError, (errno, strerror):

    print " E/S(%s): %s" % (errno, strerror)    

 

#result=os.system

#    print result

 

 

Any thoughts?

 

Thanks,

Alice Roberts

Ambac Assurance Corp.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051031/d6a42147/attachment-0001.htm


More information about the Tutor mailing list