|
||||||
| Python Discussion forum for Python, a high-level language with simple syntax, but yet powerful. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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. |
| Sponsored Links |
|
|
|
|||||
|
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
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum C/C++ resources - C/C++ frequently asked questions Python resources - Python frequently asked questions I'm always up for a chat, so feel free to contact me... |
|
|||
|
Quote:
|
|
|||
|
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. Last edited by Victor; 08-01-2007 at 12:02 PM. |
|
|||||
|
Anyone know of any tools like these for making Linux executables?
__________________
http://www.mattnichols.net |
| Sponsored Links |
|
|
|
|||||
|
Anyone know of any tools like this for creating Linux executables?
__________________
http://www.mattnichols.net |
|
|||||
|
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: Code:
#!/usr/bin/env python Code:
chmod +x your_file.py
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum C/C++ resources - C/C++ frequently asked questions Python resources - Python frequently asked questions I'm always up for a chat, so feel free to contact me... |
|
|||
|
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? Last edited by Victor; 10-02-2007 at 07:10 PM. Reason: ask v0id a ? |
|
|||||
|
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: Code:
strip your_executable_file.exe
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum C/C++ resources - C/C++ frequently asked questions Python resources - Python frequently asked questions I'm always up for a chat, so feel free to contact me... |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic Calculator | AfTriX | VB Tutorials | 3 | 02-29-2008 08:53 AM |
| Making Code Faster | falco85 | C and C++ | 10 | 04-04-2007 03:28 PM |
| Python Collection | reachpradeep | Python | 1 | 03-03-2007 02:50 PM |
| Valve: Half-Life 2 Source Code | falco85 | General Programming | 3 | 10-28-2006 05:03 PM |
| Xav | ........ | 1357.94 |
| MeTh0Dz|Reb0rn | ........ | 1077.71 |
| WingedPanther | ........ | 919.18 |
| marwex89 | ........ | 906.86 |
| morefood2001 | ........ | 900.18 |
| John | ........ | 890.77 |
| Brandon W | ........ | 770.65 |
| chili5 | ........ | 312.39 |
| Steve.L | ........ | 264.99 |
| dcs | ........ | 232.34 |
Goal: 100,000 Posts
Complete: 83%