• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Compiling/running as '.exe.

My Visual Basic application can run other executables by calling shell('filename') - if I try putting a '.py' filename in the brackets it won't have it, probably because it wants an executable file. Can I run a python file through an .exe file, such as "something.exe /myfile.py"? Or can I compile my Python source to an '.exe' of its own. Sorry for being lazy, but I'm a bit snowed under right now!
0
mi5
Asked:
mi5
  • 2
1 Solution
 
ZylochCommented:
Hi

Try having this:

shell("C:\path\to\python\python.exe something.py"

Regards,
Zyloch
0
 
ZylochCommented:
Oops forgot the closing bracket. Basically, it's like this:

shell("path/to/python.exe path/to/yourscript.py");

where it's separated by a space.

Regards
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now