1

I'm trying to make Python code executable using py2exe but they seem to not have Python 3.1 in the downloads page. Are there any other ways I could make Python executable? Is it ok if I changed the file extension of the code from .py to .exe?

Thanx

5
  • 1
    you can't change the .py to .exe Commented Sep 1, 2013 at 8:56
  • Personally, I use cxfreeze whenever I want to turn my Python games into executables. It works for me and I use the latest stable version of Python which is 3.3. py2exe seems to have a lot of bugs and doesn't work with a lot of modules. Commented Sep 1, 2013 at 9:02
  • 7
    @KDawG: Well, you can, but it's like sticking a "Toaster" label on your blender with a label maker and expecting it to make toast. Commented Sep 1, 2013 at 9:06
  • @KDawG: Read the username. I'm not the OP. If I were, there would be a blue background behind my name. Commented Sep 1, 2013 at 9:33
  • @user2357112 oops sorry dude, anyway no avatar is displayed when you comment and the OP's and yours names are way too similar! Commented Sep 1, 2013 at 9:46

2 Answers 2

1

One thing I am pretty sure you can do, though it's fragile and is not that suitable for deploying across multiple users, is make a shortcut to your Python.exe binary and edit the shortcut command line to be something like:

"C:\Python31\python.exe" <path to your script>

The main problem with this, and the reason it's not very desirable, is that each copy needs to be modified if the paths change.

Another possibility is to wrap the Python script's execution in a .bat file.

Shashank Gupta, in comments above, also recommends checking out cxfreeze. I haven't used this tool, but it might work for you.

Sign up to request clarification or add additional context in comments.

Comments

0

you can cxfreeze. it is easy. and i am using it.

see this stackoverflow answer:

How to make others use my Python Script

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.