.py to .exe file conversion via command prompt
nav_first.pngFirst: blog:1
Private Server Community
Edited: 05 Jun 2017 17:47 by: Slater River
Comments: 0
Tags: aqwps partner plasmily private-server shutdown slater-river
nav_prev.pngPrevious: blog:1
Private Server Community
Edited: 05 Jun 2017 17:47 by: Slater River
Comments: 0
Tags: aqwps partner plasmily private-server shutdown slater-river
nav_last.pngLast: blog:13
creating/using a carousel for your site
Edited: 14 Aug 2017 17:46 by: Slater River
Comments: 0
Tags:
nav_next.pngNext: blog:3
protection for your website in one script
Edited: 14 Aug 2017 17:34 by: Slater River
Comments: 0
Tags: ddos-protection .rb ruby save-money site

Slater RiverSlater River wrote on 04 Jun 2017 23:21
Tags: cmd-prmpt code compile .exe .py

I have been writing code for a lot of projects and did some research on how to compile a .py (python file) to an .exe (a program). Here is the code listed below.

All you need to have is Python 2.7 and be able to program in python. You can also covert it to an .exe file via using py2exe.

# setup script written in python to convert to a program.
# follow insructions in order to successfully convert a .py file
# to a .exe file. 
# file version 0.4
# script written by Slater River
 
#setup.py
from distutils.core import setup
import py2exe, sys, os
 
sys.argv.append('py2exe')
 
setup(
    options = {'py2exe': {'bundle_files': 1}}, # compiles script to an .exe file 
    windows = [{'script': "myscript.py"}], # change 'myscript' to your script
    zipfile = None,
)

Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License