Posts Tagged ‘ configure

Create a single standalone .exe from a Python program

I have been working on a small command line tool that I wanted to distribute it as a single executable file on . I tried cx_freeze and py2exe. Both of these tools worked well, but I couldn’t find an easy way to compress make the whole program into a .exe file. py2exe and cx_freeze both create working programs, but there are always some dependent .zip archive or .dll’s somewhere that need to be distributed with it. Pyinstaller, I found, actually compresses everything into a single .exe. This makes a pretty big executable (my small command line utility created a 5MB .exe file), but it’s simple and it works.

To use pyinstaller:

  1. grab pyinstaller 1.5rc (1.4 doesn’t work with 2.7). extract the zip file anywhere.
  2. change directories to the pyinstaller folder you just created.
  3. Before you create your first executable, you will have to run this once.
  4. python .py
  5. Now, pyinstall needs to scan through your program and create what they call a spec file.
  6. python makespec.py --onefile path\to\program\program.py
  7. Now, run this command to generate the executable.
  8. python build.py program\program.spec

Once the command has finished, the standalone executable will be available in the program\dist folder inside of pyinstaller.
Instructions for how to do this for a linux executable on linux can be found here: http://excid3.com/blog/2009/12/pyinstaller-a-simple-tutorial/. You can find more info on pyinstaller at their website: http://www.pyinstaller.org/.

Pidgin OSD pop ups in Ubuntu Jaunty

You can remove or the pop up’s that you see from . Buddies logging on/off, and in my case, new messages. I didn’t want every new message i receive to be blasted up on the desktop . To control what you see there, Pull up your window (buddy window, not your conversation box), then: Tools -> Plugins -> . When you have selected the pop-ups, click on “ plug-in”. That will give you some check boxes to customize the behaviour