ok I had looked on the internet and found one form of running an exe file from a py script, i goes like this.
import os os.system("c:/windows/iexplore.exe") # Or wherever it lives
Problem is, whenever i run the script with the appropriate path loaded in, i get the following:
Traceback (most recent call last): File "C:\csuite\startup.py", line 14, in <modul choises(choise) File "C:\csuite\startup.py", line 11, in choise os.execv("C:\csuite\Re-Codon\rcodon.exe", cho TypeError: execv() arg 2 must be a tuple or list
I origginally got some kind of error involving a batch or runnable file, so I switched to this because I looked up the os module in python, and apparantly the os.execv will do the job better for me cause it requires a path....
but when i run the script like that, I get the following...
Traceback (most recent call last): File "C:\csuite\startup.py", line 14, in <module> choises(choise) File "C:\csuite\startup.py", line 11, in choises os.execv("C:\csuite\Re-Codon\rcodon.exe") TypeError: execv() takes exactly 2 arguments (1 given)
I don;t know what those 2 arguments are, how do I find them out?
Here is the python script just incase you need to look at it....
EDIT: The purpose of this little snippet is for a software suite im desging, I made a little program that codes standard alphabet, into the language of DNA, then there's another that goes in reverse. Anyways, I compiled both in py2exe and put the dist folders in one folder called, CSuite. Basically, this script will server as a start screen and when you type 1 or 2, and hit enter, the other one of the two programs will pop up. BTW: Everything is in console form, I plan to make it a UI in the next release.
import os print "Welcome to the DNA codon encoder, and decoder." print "Plese select the program you want to use from the list and press enter." print "If you would like to use the encoder, press 1." print "If you would like to use the decoder, press 2." choise = input("So, what program would you like to use?") def choises(choise): if choise == 1: os.execv("C:\csuite\Re-Codon\rcodon.exe") elif choise == 2: os.execv("C:\csuite\Codon\codon.exe") choises(choise)