wxpython appearance differs after py2exe

J

Jeff Duffy

Chad said:
Hello,

I have a wxPython application that I want to create an executable from.
Using py2exe produces a program that works very well, but the
appearance is slightly different than when it was run from the command
line. The py2exe version is a little more bland. Here are links to
some screenshots:

http://linkage.rockefeller.edu/chaynes/dos.jpg
http://linkage.rockefeller.edu/chaynes/py2exe.jpg

I'm runnin winXP, any ideas?

I've have the same problem. No solution yet (I'm still poking at it),
but I noticed that the resultant GUI looks more like Win2K, as if
perhaps the widget set that results is always in 'classic mode'. Odd.

Jeff
 
N

Neil Hodgson

Chad Haynes:
I have a wxPython application that I want to create an executable from.
Using py2exe produces a program that works very well, but the
appearance is slightly different than when it was run from the command
line. The py2exe version is a little more bland. Here are links to
some screenshots:

To get the Windows XP look you have to include a manifest file or
resource.

Neil
 
T

Thomas Heller

Chad Haynes said:
Hello,

I have a wxPython application that I want to create an executable
from. Using py2exe produces a program that works very well, but the
appearance is slightly different than when it was run from the command
line. The py2exe version is a little more bland. Here are links to
some screenshots:

http://linkage.rockefeller.edu/chaynes/dos.jpg
http://linkage.rockefeller.edu/chaynes/py2exe.jpg

I'm runnin winXP, any ideas?

You have to provide a manifest file. This can be a separate file named
<yourapp>.exe.manifest, but it can also be compiled as a resource into
the exe file itself. The py2exe\samples\advanced directory demontrates
how to do this.

Thomas
 
W

Wolfgang Strobl

Chad Haynes said:
Hello,

I have a wxPython application that I want to create an executable from.
Using py2exe produces a program that works very well, but the
appearance is slightly different than when it was run from the command
line. The py2exe version is a little more bland. Here are links to
some screenshots:

http://linkage.rockefeller.edu/chaynes/dos.jpg
http://linkage.rockefeller.edu/chaynes/py2exe.jpg

I'm runnin winXP, any ideas?

I guess your program somehow lost its ability to use the current
version of ComCtl32.dll. The visual style of the Windows XP controls is
implemented in comctl32.dll version 6, which is not distributable. I
just noticed that there is a python.exe.manifest and a
pythonw.exe.manifest in in the python23 distro. Perhaps it is
sufficient to copy one of these to your py2exe dist, renaming it to
<app>.exe.manifest, on the way. Not having done anything with
comctl32 et al for years, I'm just guessing here from an article I've
read on MSDN. But I can't do any harm, so why not just trying it.
 
W

Wolfgang Strobl

Wolfgang Strobl said:
[...] But I can't do any harm, so why not just trying it.

Arg. But _it_ can't do any harm ... It's getting late, sorry.

An afterthought: adding a <app>.manifest would make a nice addition to
py2exe. I'd file a feature request on sourceforge, but, alas, it's
working in read only mode, currently, if it answers at all.
 
R

Roger Binns

I'm runnin winXP, any ideas?

You need to include the manifest file. This comes up on the wxpython-users
mailing list once a week and there are full details in the archives.

Briefly, copy python.exe.manifest from c:\python23 and place it
alongside your executable, suitably renamed to the same name
as your executable, with a further .manifest extension.

Roger
 
R

Robert

Chad said:
Hello,

I have a wxPython application that I want to create an executable from.
Using py2exe produces a program that works very well, but the
appearance is slightly different than when it was run from the command
line. The py2exe version is a little more bland. Here are links to
some screenshots:

http://linkage.rockefeller.edu/chaynes/dos.jpg
http://linkage.rockefeller.edu/chaynes/py2exe.jpg

I'm runnin winXP, any ideas?

-Chad
Here is a copy of the manifest I use with eclipse:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
name="SWT.javaw" type="win32"/>
<description>Standard Widget Toolkit</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32"
name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
</assembly>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top