473,721 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxpython + py2exe + innosetup

I'm "exefying" an application that uses wxpython, some com to control excel
and word and want to distribute this application.

after creating the executable with py2exe, it still works fine (at least on
my development machine), however, if I create an installer package with
innosetup, install it and try to run it, I get a busy cursor for a split
second and then.. nothing. no errors no traceback no nothing.. viewing
dependencies does not reveal anything strange, and running the installed
program in a debugger just tells that the application has exited with code
0.

...where do I go from here, I'm running out of ideas.. ?

/Simon
Jul 18 '05 #1
4 5505
"Simon Dahlbacka" <sd************ *@abo.fi> wrote:
I'm "exefying" an application that uses wxpython, some com to control excel
and word and want to distribute this application.

after creating the executable with py2exe, it still works fine (at least on
my development machine), however, if I create an installer package with
innosetup, install it and try to run it, I get a busy cursor for a split
second and then.. nothing. no errors no traceback no nothing.. viewing
dependencies does not reveal anything strange, and running the installed
program in a debugger just tells that the application has exited with code
0.


Does the program rely on any paths to files - i.e. does it open your
Excel/Word file from the current directory?

This is the only problem I've ever found with Inno - it's an FAQ too,
there's an option to set the "Run From" property in the shortcuts. The
sympton is that it won't work from the shortcut in Start/Desktop but
will work from the program directory.

What about permissions - if you installed it as non-Admin and it needs
to write something Admin-only.....

ISTool can make the InnoSetup options a bit easier to deal with -
maybe you're accepting a default that needs to be changed?

Some useful tips here:
http://starship.python.net/crew/thel...terCompression
Jul 18 '05 #2
si************@ yahoo.co.uk (simo) wrote in message news:<30******* *************** ****@posting.go ogle.com>...
"Simon Dahlbacka" <sd************ *@abo.fi> wrote:
I'm "exefying" an application that uses wxpython, some com to control excel
and word and want to distribute this application.

after creating the executable with py2exe, it still works fine (at least on
my development machine), however, if I create an installer package with
innosetup, install it and try to run it, I get a busy cursor for a split
second and then.. nothing. no errors no traceback no nothing.. viewing
dependencies does not reveal anything strange, and running the installed
program in a debugger just tells that the application has exited with code
0.
Does the program rely on any paths to files - i.e. does it open your
Excel/Word file from the current directory?


it _should_ not, I had a problem with this earlier regarding icons,
but switched over to resourcepackage now. And both Excel and Word
doesn't do any filehandling until I explicitely "hit the button"
This is the only problem I've ever found with Inno - it's an FAQ too,
there's an option to set the "Run From" property in the shortcuts. The
sympton is that it won't work from the shortcut in Start/Desktop but
will work from the program directory.

What about permissions - if you installed it as non-Admin and it needs
to write something Admin-only.....
...hmm, I'm just doing a default install, there is however registry
settings involved, but since I've installed it being admin and running
it being admin, I doubt this is the problem.
ISTool can make the InnoSetup options a bit easier to deal with -
maybe you're accepting a default that needs to be changed?


hmm, never heard of that, I have to check it out later..

another strange thing is that I tried to sprinkle "print I got here
statements" all over the place, but didn't see any of those, even
running from a console.
/Simon
Jul 18 '05 #3
sd******@abo.fi (Simon Dahlbacka) writes:
si************@ yahoo.co.uk (simo) wrote in message news:<30******* *************** ****@posting.go ogle.com>...
"Simon Dahlbacka" <sd************ *@abo.fi> wrote:
> I'm "exefying" an application that uses wxpython, some com to control excel
> and word and want to distribute this application.
>
> after creating the executable with py2exe, it still works fine (at least on
> my development machine), however, if I create an installer package with
> innosetup, install it and try to run it, I get a busy cursor for a split
> second and then.. nothing. no errors no traceback no nothing.. viewing
> dependencies does not reveal anything strange, and running the installed
> program in a debugger just tells that the application has exited with code
> 0.
another strange thing is that I tried to sprinkle "print I got here
statements" all over the place, but didn't see any of those, even
running from a console.


If you build it as windows program (not console), sys.stderr is
redirected to a logfile, and sys.stdout is redirected into the eternal
bitsink. This is to prevent IO errors in your debug print statements,
or when tracebacks are printed. The code which does this is in
py2exe/boot_common.py for your inspection and/or improvements.

You can also override this default behaviour by assigning your own
objects to sys.stdout and sys.stderr.

Unfortunately, this very code in py2exe 0.5.0 has a bug, which will be
triggered when the sys module is *not* imported in your main script (the
'sys' symbol is deleted too early in boot_common.py) .

So, it could be that your program tries to report something, and then
'crashes' (meaning: fails to initialize).

I will release py2exe 0.5.1 later this week, which should have fixed
this and other bugs ;-).
What I usually do to find out why a program behaves strange, is to build
both a console *and* a windows version (with different names, say
app_c.exe and app.exe). Then, you can (even on the target machine) run
the console version to see the debug prints, and after you have found
and fixed potential problems, run the windows version and delete the
console version again. Or you simply don't create a shortcut for the
console version.

Hope that helps,

Thomas

Jul 18 '05 #4
Thomas Heller wrote:
sd******@abo.fi (Simon Dahlbacka) writes:

si*********** *@yahoo.co.uk (simo) wrote in message news:<30******* *************** ****@posting.go ogle.com>...
"Simon Dahlbacka" <sd************ *@abo.fi> wrote:
I'm "exefying" an application that uses wxpython, some com to control excel
and word and want to distribute this application.

after creating the executable with py2exe, it still works fine (at least on
my development machine), however, if I create an installer package with
innosetup , install it and try to run it, I get a busy cursor for a split
second and then.. nothing. no errors no traceback no nothing.. viewing
dependencie s does not reveal anything strange, and running the installed
program in a debugger just tells that the application has exited with code
0.


another strange thing is that I tried to sprinkle "print I got here
statements" all over the place, but didn't see any of those, even
running from a console.

If you build it as windows program (not console), sys.stderr is
redirected to a logfile, and sys.stdout is redirected into the eternal
bitsink. This is to prevent IO errors in your debug print statements,
or when tracebacks are printed. The code which does this is in
py2exe/boot_common.py for your inspection and/or improvements.

You can also override this default behaviour by assigning your own
objects to sys.stdout and sys.stderr.

Unfortunately, this very code in py2exe 0.5.0 has a bug, which will be
triggered when the sys module is *not* imported in your main script (the
'sys' symbol is deleted too early in boot_common.py) .

So, it could be that your program tries to report something, and then
'crashes' (meaning: fails to initialize).

I will release py2exe 0.5.1 later this week, which should have fixed
this and other bugs ;-).
What I usually do to find out why a program behaves strange, is to build
both a console *and* a windows version (with different names, say
app_c.exe and app.exe). Then, you can (even on the target machine) run
the console version to see the debug prints, and after you have found
and fixed potential problems, run the windows version and delete the
console version again. Or you simply don't create a shortcut for the
console version.


hmm, I added a bogus "import sys"

and removed zipfile="lib\co mmon.zip" from the setup script, which seemed
to generate strange results, py2exe generated lib\shared.zip and
installing * from that directory _somehow_ produced lib\common.zip in
the install dir (I have absolutely NO clue..), removing that line
produces all files in the same directory, which SEEM to work after the
little testing I have done, (except the no codecs found, which can be
solved by adding encodings, OTOH, I cannot get Mark's solution (from
py2exe wiki) to work with 'encodings', 'encodings.lati n_1' to just get
latin-1 encodings. I'm probably just too stupid to get it or something..

/Simon
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1139
by: Lad | last post by:
I use wxPython 2.5.3 with PythonWin 2.3.4. I have a script that can be run from Python without any problems. But when I try to run the compiled script( with Py2exe) I get Traceback (most recent call last): File "start.py", line 1, in ? File "rgs.pyc", line 17, in ? File "wxPython\__init__.pyc", line 10, in ? File "wxPython\_wx.pyc", line 3, in ?
25
4278
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
0
1560
by: Durumdara | last post by:
Hi ! I have an application that I compile to exe. 1.) I want to compile main.ico into exe, or int zip. Can I do it ? 2.) Can I compile the result to my specified directory, not into the dist ? I want to structure my projects like this:
22
5047
by: Glurt Wuntal | last post by:
I am a newbie with Python. It's a great language, but I would like to be able to present a simple gui menu for some of my scripts; something better than using 'raw_input' prompts. Any recommendations for a program that will allow me to create the gui screens? Something useable in Linux. thanks.
6
4757
by: zdp | last post by:
Dear all: I made a window program by wxPython. Split windows, treectrl, listctrl and textctrl are used. When I program in python, the look & feel of the window controls are like the windos XP look & feel, with thin and flat border (My os is window XP). It's natural because, as I know, wxPython use native look and feel. But when I convert the program to EXE file by Py2exe, and run it, the look & feel is bad. It's just like the windows...
10
3948
by: Vincent Delporte | last post by:
Hi I browsed the archives, but since some messages date back a bit, I wanted to make sure that - py2exe is still the best tool in town to compile Python scripts to run on a Windows host that doesn't have Python installed, including wxWidgets/wxPython - there's no way to build a single EXE, to make deployment easier (if
3
2925
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 setup(windows=)
0
13469
bartonc
by: bartonc | last post by:
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. #...
0
1026
by: Leo Lee | last post by:
Hi, I think I have already solved this problem while I am digging into the installation sources. I found this: C:\Python25\Lib\site-packages\py2exe\samples\singlefile\gui\setup.py # Requires wxPython. This sample demonstrates: # # - single file exe using wxPython as GUI.
0
9365
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9212
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9127
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9056
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8002
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5973
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3186
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2569
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.