You can find the original author of the script by ggling " Py2Exe version 6.3 setup" The cool thing about this is that it calls py2exe, just in case you're uncomfortable with the command line. I had to search hi and lo for the example of how to exclude Tkinter. Coming soon: scipy includes and numpy include that gets rid of complaints of missing modules that are fantom errors. - # Py2Exe version 6.3 setup file for wxPython GUI programs.
-
# Creates a single exe file.
-
# It's easiest to add this wxPython2Exe.py file into the same
-
# folder with the source file and an optional iconfile like "icon.ico"
-
# (if you add your own icon file, remove the comment in front of icon_resources).
-
# Simply change the filename to whatever you called your source file.
-
# Optionally edit the version info and add the name of your icon file.
-
# Now run wxPython2Exe.py ...
-
# Two subfolders will be created called build and dist.
-
# The dist folder contains your .exe file, MSVCR71.dll and w9xpopen.exe
-
# Your .exe file contains your code, all neded modules and the Python interpreter.
-
# The MSVCR71.dll can be distributed, but is often already in the system32 folder.
-
-
from distutils.core import setup
-
import py2exe
-
import sys
-
-
sys.path.append(r"D:\My Documents\HETAP Project\2.05a")
-
-
-
# enter the filename of your wxPython code file to compile ...
-
filename = "App1.pyw"
-
-
# ... this creates the filename of your .exe file in the dist folder
-
if filename.endswith(".py"):
-
distribution = filename[:-3]
-
elif filename.endswith(".pyw"):
-
distribution = filename[:-4]
-
-
-
# if run without args, build executables in quiet mode
-
if len(sys.argv) == 1:
-
sys.argv.append("py2exe")
-
sys.argv.append("-q")
-
-
class Target:
-
def __init__(self, **kw):
-
self.__dict__.update(kw)
-
# for the versioninfo resources, edit to your needs
-
self.version = "2.0.1"
-
self.company_name = "BCDesigns"
-
self.copyright = "no copyright"
-
self.name = "HETAP Pro 2.01a"
-
-
################################################################
-
# The manifest will be inserted as resource into your .exe. This
-
# gives the controls the Windows XP appearance (if run on XP ;-)
-
#
-
# Another option would be to store it in a file named
-
# test_wx.exe.manifest, and copy it with the data_files option into
-
# the dist-dir.
-
#
-
manifest_template = '''
-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-
<assemblyIdentity
-
version="5.0.0.0"
-
processorArchitecture="x86"
-
name="%(prog)s"
-
type="win32"
-
/>
-
<description>%(prog)s Program</description>
-
<dependency>
-
<dependentAssembly>
-
<assemblyIdentity
-
type="win32"
-
name="Microsoft.Windows.Common-Controls"
-
version="6.0.0.0"
-
processorArchitecture="X86"
-
publicKeyToken="6595b64144ccf1df"
-
language="*"
-
/>
-
</dependentAssembly>
-
</dependency>
-
</assembly>
-
'''
-
-
RT_MANIFEST = 24
-
-
# description is the versioninfo resource
-
# script is the wxPython code file
-
# manifest_template is the above XML code
-
# distribution will be the exe filename
-
# icon_resource is optional, remove any comment and give it an iconfile you have
-
# otherwise a default icon is used
-
# dest_base will be the exe filename
-
test_wx = Target(
-
description = "A GUI app",
-
script = filename,
-
other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog=distribution))],
-
#icon_resources = [(1, "icon.ico")],
-
dest_base = distribution)
-
-
################################################################
-
packages = ["mx.ODBC.Windows"] #"scipy.signal", "numpy.core", "UniversalLibrary",
-
includes = ["PMDDialog", "PMD"]
-
excludes = ["pywin", "pywin.debugger", "pywin.debugger.dbgcon",
-
"pywin.dialogs", "pywin.dialogs.list",
-
"Tkconstants","Tkinter","tcl",
-
]
-
-
setup(
-
options = {"py2exe": {"compressed": 1,
-
"optimize": 2,
-
"ascii": 1,
-
"bundle_files": 1,
-
"packages": packages,
-
## "includes": includes,
-
"excludes": excludes}},
-
-
zipfile = None,
-
windows = [test_wx],
-
)
-
0 13414 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Werner Merkl |
last post by:
Hi,
Python is really great, for small to big programs. For my colleagues and
some circumstances I sometimes need to "compile" a script using py2exe.
Cause I use Windows, I like to use the...
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.4 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python...
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.5 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python...
|
by: bwaha |
last post by:
First time trying to create an executable with py2exe. I have a small
program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'),
matplotlib ('0.83.2'), win32com (latest?), Numeric...
|
by: Jerry |
last post by:
I have created an application using wxPython and compiled it using
py2exe. When I put
setup(console=)
in my setup.py file, the resulting application runs just fine. But
when I change it to...
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.6 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python...
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.8 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python...
|
by: Larry Bates |
last post by:
Jimmy Retzlaff wrote:
Everyone,
Thanks for all your hard work on py2exe, it is greatly appreciated.
-Larry Bates
|
by: Jimmy Retzlaff |
last post by:
py2exe 0.6.9 released
=====================
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |