View Single Post
Old Sep 9th, 2006, 3:56 PM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
You should use os.path.join for this task to make your code (more) portable.

You should also use a Popen object from the subprocess module rather than os.system for the same reason.

You could also, as a matter of preference, prepend your paths with r to create raw strings so that you don't have to escape backslashes (unless the last character in the string is a backslash, in which case it must be escaped).
titaniumdecoy is offline   Reply With Quote