473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 5475
"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.google. 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.google. 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.google. 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.


hmm, I added a bogus "import sys"

and removed zipfile="lib\common.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.latin_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
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...
25
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...
0
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...
22
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...
6
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...
10
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...
3
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...
0
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.