Advertisement
johnmahugu

Python - STANDALONE WINDOWS EXE

Mar 10th, 2016
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. STAND ALONE PYTHON
  2. Single-File Stand-alone Python 2.7.9 for Windows
  3. Download
  4.  
  5. py.exe - Python 2.7.9 as a single, stand-alone executable with virtually all the standard libraries, plus pywin32-219 and psutil 2.1.3. Compiled with py2exe (see source below) on Windows XP. This should work on Windows XP and later. This works just like a full install of python, except you only need the one file. 9.9 Mb.
  6.  
  7. pyexe-2.7.9.10.zip - Zip file of the stand-alone exectuable. 9.8 Mb.
  8.  
  9. pyexe-src-2.7.9.10.zip - The source code for making the py.exe file. See the README.TXT within the zip file for details. Requires a full install Python 2.7.9, pywin32-219, psutil 2.1.3, setuptools.py, and py2exe. 10 kb.
  10. Rationale
  11.  
  12. I frequently write programs in python as it is a handy, powerful language. However, sometimes I don't want to install it. There are some other projects to give a portable python implementation. That still seems too heavy for some tasks.
  13.  
  14. Here is a Windows executable form of Python 2.7.9 that contains most of the standard libraries, plus pywin32. It has the following features:
  15.  
  16. Single file with no dependencies besides Windows (XP or later)
  17. Can run python programs (e.g., py.exe sample_program.py)
  18. Can be used as an interactive shell (e.g., py.exe, then start typing)
  19. Can be used to execute string commands (e.g., py.exe -c "print 'hello world'")
  20.  
  21. I've included the very simple source code, which is nothing more than a setup.py script using py2exe. I compressed the executable using upx, which reduces its size by 12% or so and doesn't substantially slow down starting the program.
  22.  
  23. Note: I have one report that when running the program on Windows 7 64-bit, you need to have the current working directory set to the location of the py.exe program. Not having a copy of Windows 7 64 bit, I cannot determine if I could work around this issue.
  24.  
  25. 2013 May 19 - David Manthey - Updated 2015 January 4
  26. Change Log
  27.  
  28. See the program source for the definitive change log.
  29.  
  30. 2.7.9.10:
  31.  
  32. Upgraded to python 2.7.9
  33. Added psutil 2.1.3 win32
  34. Added support for the -m option.
  35. Turned off the optimization flag when building py.exe. Having it on interferes with some modules (such as sympy) which rely on docstring manipulation.
  36.  
  37. 2.7.8.9:
  38. My change to make globals dictionaries more consistent broke multiprocessing forking. I've reverted some of the changes.
  39.  
  40. 2.7.8.8:
  41. Fixed a bug I introduced in the last version when renaming the variable "loc".
  42.  
  43. 2.7.8.7:
  44. Added support for -E, -x, and --version options.
  45. Changed how the globals / locals dictionaries are used for greater consistency in different execution modes.
  46. Accept multiple single letter command line options grouped together.
  47.  
  48. 2.7.8.6:
  49. Added support for multiprocessing forking
  50. Added support for non-ttty direct usage (input and output pipes, for instance)
  51. Added support for -i option and PYTHONINSPECT environment variable.
  52. Turned off "frozen" flag in py.exe
  53. Upgraded pywin32 to build 219 (was 218).
  54. Upgraded to python 2.7.8
  55. Added import site to interactive prompts to get help and other commands added to the builtins.
  56. Added support for unbuffered -u option and PYTHONUNBUFFERED environment variable.
  57.  
  58. 2.7.5.5:
  59. Imported submodules, such as logging.handlers, since they weren't included implicitly.
  60.  
  61. 2.7.5.4:
  62. Upgraded to python 2.7.5
  63.  
  64. 2.7.4.3:
  65. Added the program path to sys.path when running a program, and "" to sys.path when running direct or interpretted.
  66.  
  67. 2.7.4.2:
  68. fixed an issue with __file__ and __name__
  69.  
  70. 2.7.4.1:
  71. initial release
  72.  
  73. [ Programs | Orbitals Central | Site Map]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement