Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pyinsaller [2014/10/26 01:52] (current)
Line 1: Line 1:
 +== PyInstaller ==
  
 +Another option to building exe's for Windows and also support for creating distributions for Mac and Linux is to use [[http://​www.pyinstaller.org/​export/​latest/​tags/​1.4/​doc/​Manual.html?​format=raw#​configuring-your-pyinstaller-setup|Pyinstaller]]
 +
 +To install this, first download the pyinstaller package, and unzip this to any location you like, for me I installed this under //​C:​\Learn\Pyinstaller//​.
 +
 +To build an exe for the hello.py:
 +
 +<code python>
 +for i in range(25):
 +   print "Hello World "​+str(i+1)
 +</​code>​
 +
 +To build an exe, the first step is to create a spec file as shown below:
 +
 +<code bat>
 +c:​\python25\python.exe c:​\learn\pyinstaller\Makespec.py hello.py
 +</​code>​
 +
 +To build the exe use the spec file as shown below:
 +
 +<code bat>
 +c:​\python25\python.exe c:​\learn\pyinstaller\Build.py hello.spec
 +</​code>​
 +
 +This creates a dist folder with all files to run hello.exe, there is an option //​--onefile//​ passed to the //​Makespec.py//​ to make a single hello.exe file.
 +
 +----
 +
 +  * [[pythoninfo|Back to Python]]
pyinsaller.txt ยท Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0