Capture DOS error???
Syver Enstad
syver at inout.no
Thu Jun 19 06:29:35 EDT 2003
More information about the Python-list mailing list
Thu Jun 19 06:29:35 EDT 2003
- Previous message (by thread): Capture DOS error???
- Next message (by thread): Definition of Aspect Oriented Programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Stan Cook" <scook at elp.rr.com> writes: > I'm writing a script which at some point will map to a list of servers. The > program will be keeping a log of problems it encounters to be reviewed > later. To map the drive, I am using: > > sDrive = > ["B","F","G","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X" > ,"Y","Z"] > iIndex = 0 > shellCmd = "" > for s in sImage: # list of servers > shellCmd = "map " + sDrive[iIndex] + ":=" + s > iIndex=iIndex + 1 > os.system(shellCmd) Would this help: errorlevel = os.system(shellCmd) if errorlevel != 0: # do error stuff here
- Previous message (by thread): Capture DOS error???
- Next message (by thread): Definition of Aspect Oriented Programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list