I have written my source code and it works like a dream. It's tested, documented and optimized. However, I lack one piece of fundimental knowelgde. How do I turn my python source code into a stand alone application (for windows) that is simply an icon on the desktop that you click?
Thanks Peter.
Making it Standalone from Source Code (Python)
Started by annannienann, Jun 17 2007 02:33 PM
8 replies to this topic
#1
Posted 17 June 2007 - 02:33 PM
|
|
|
#2
Posted 17 June 2007 - 08:44 PM
That is a sometimes complicated task to do. Pythonscripts always requires Python to be installed, so when you are making an executablefile, then the executable will contain all the necessarily Python to make it run. It makes the executable both slow and big.
When that's said, here's a link:
FrontPage - py2exe.org
When that's said, here's a link:
FrontPage - py2exe.org
#3
Posted 18 June 2007 - 11:20 AM
v0id said:
That is a sometimes complicated task to do. Pythonscripts always requires Python to be installed, so when you are making an executablefile, then the executable will contain all the necessarily Python to make it run. It makes the executable both slow and big.
When that's said, here's a link:
FrontPage - py2exe.org
When that's said, here's a link:
FrontPage - py2exe.org
Thanks void, you really hit the nail on the head. I am currently pulling together all the techo know how to create my unit 6 course work for computering A2. You also led me to another website that allowed me to create installers easily so two birds with one stone there. Thanks.
#4
Posted 01 August 2007 - 09:00 AM
Py2exe is an excellent choice to convert .py to .exe. However, I would like to recommend Pyinstaller, it will make a single exe with everything needed to work. You won't have to distribute a whole directory, also, Pyinstaller's output is consistently smaller in size than Py2exe. They both have plenty of solid features and are fairly easy to figure out.
Also, if you're looking for an installer, I recommend NSIS with HM NIS Editor. I couldn't stand the language of NSIS but when I got HM NIS, it was much easier, smaller, more compact installers too.
Also, if you're looking for an installer, I recommend NSIS with HM NIS Editor. I couldn't stand the language of NSIS but when I got HM NIS, it was much easier, smaller, more compact installers too.
#5
Posted 01 October 2007 - 06:22 PM
Anyone know of any tools like these for making Linux executables?
#6
Posted 01 October 2007 - 06:24 PM
Anyone know of any tools like this for creating Linux executables?
#7
Posted 01 October 2007 - 08:50 PM
I don't know a way to make a Python-script to a "real" executable file. But you could cheat, a little, and do this.
Put this in the top of your Python document:
Put this in the top of your Python document:
#!/usr/bin/env pythonThen you can chmod'e it, to make it executable:
chmod +x your_file.pyI've heard the new official Python-package comes with a new program, exemaker. I don't know if it's able for Linux, but in Windows it should be able to generate executable-files pretty easy.
#8
Posted 02 October 2007 - 04:07 PM
I read that most Linux OSs have Python built-in. However, I did find a post on a different forum that suggested something called 'python-eggs'. I don't use Linux (yet) but maybe this can help you out.
A py2exe like tool for Linux - Python
Python Eggs
Also, v0id, do you know if the size of the .exe's has improved over Py2exe or Pyinstaller?
A py2exe like tool for Linux - Python
Python Eggs
Also, v0id, do you know if the size of the .exe's has improved over Py2exe or Pyinstaller?
#9
Posted 02 October 2007 - 08:45 PM
No, I don't know. I don't really know anything about neither of them, because I haven't really worked with them. If you're thinking about making the executable smaller, then it's possible with other alternatives.
GCC have a small program called "strip," which removes all unnecessary information from an executable file. Start out by converting the Python script to an executable file, and then do this:
GCC have a small program called "strip," which removes all unnecessary information from an executable file. Start out by converting the Python script to an executable file, and then do this:
strip your_executable_file.exe


Sign In
Create Account


Back to top









