November 1st, 2003, 02:00 AM
Launching files with Python
Can anyone tell me how to open (launch) a file? For example, let's say I have a .bat file within the same directory as my .py file. What am i supposed to do?
Berk Can Celebisoy
November 1st, 2003, 02:32 AM
I'm assuming your on windows since you mentioned batch files for some reason.. Anyway you should be able to execute a Python program/file simply by double clicking on it!
November 1st, 2003, 03:28 AM
I'm guessing you want to open other files, not execute the python one.
Anyway, if you can execute the other file, such as a bat-file, you should be able to execute them from within a python script with "os.system('path-to-file')". If it's a regular file, you'd need some other utility to open it with the application of your choice.