Python 3.4 Compiler?
Question: Ever since I started learning Python, I have wanted to distribute some small
programs I have made to my friends. Without handing out my source code. My
question is, what compilers are there for Python 3.4? I have heard of
cx_freeze and tried it, but it doesn't work for me. I am on Windows and it
compiles my code for Mac. Any compiler suggestions or how to compile?

PLEASE NOTE: I am a beginner to Python. I barely know much of the language or
how any of it works.


Answer: Have a look at this page. It should answer your question.

<https://wiki.python.org/moin/DistributionUtilities>

INNO would be a brute force way to ensure that all of the required python
files are installed. INNO looks like the traditional install shield installers
that Windows users are used to.

Here is the link to INNO: <http://www.jrsoftware.org/isinfo.php>

Here is an INNO script that will install python as a python as a prereq then
install your python scripts. Obviously you will have to adjust the paths to
reflect your system and you will have to download the python-x.y.z.msi file.

    
    
    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
    
    #define MyAppName "PythonTest"
    #define MyAppVersion "1.5"
    #define MyAppPublisher "My Company, Inc."
    #define MyAppURL "http://www.example.com/"
    #define MyAppExeName "PythonTest.py"
    
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{72A57135-5C83-4A70-83F6-965EBE7DA65C}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}\{#MyAppName}
    DefaultGroupName={#MyAppName}
    OutputBaseFilename=setup
    Compression=lzma
    SolidCompression=yes
    
    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    
    [Files]
    Source: "C:\Users\engineering12\Desktop\PythonTest.py"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\Users\engineering12\Downloads\python-2.7.8.msi"; DestDir: "{app}"; Flags: nocompression
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    [Icons]
    Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    
    [Run]
    Filename: "msiexec.exe"; Parameters: "/i ""{app}\python-2.7.8.msi"""
    

Here is the script PythonTest.py:

    
    
    import time
    
    for i in range(100):
        print i
        time.sleep(2)
    

INNO will generate a file called setup.exe that you can distribute to your
friends. Your python scripts will be available via the start menu.

