yadin wrote: > hi! i need to know how i can run ussal commands that i ussally type at > the windows command prompt from a python file. that is for example > from the windows command prompt i ussually type "cd D:\folder\ nec2++ - > i inputfile.nec -o outputfile.out " now how can i execute this > command that i ussually type at the windows command prompt from a > python file? > i know it has to do with the sys and os module but how specifically? > what commands? any references? > You can use os.system or if your needs are more complex, take a look at the subprocess module.
import os import sys os.chdir('D:\\folder') os.system('D:\\nec2++ -i inputfile.new -o outputfile.out') -Larry -- http://mail.python.org/mailman/listinfo/python-list