Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 2nd, 2006, 1:29 AM   #21
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,013
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Gah! When compiling wxPython with py2exe, everything gets all screwed up.

The styles of the widgets turn into what they look like when I tested it on a windows98. The buttons go square, the StaticBoxes turn black and square. The images lose their alpha layer. Etc...

How can I fix this?

As well, compiling the .pyw didn't keep it running without a console window. How do I prevent the console window from showing (on Windows only)? I swear I had it working previously by using .pyw ...
Sane is offline   Reply With Quote
Old Jun 2nd, 2006, 5:43 AM   #22
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
On my machine, Py2exe installed a samples directory at C:/Python24/Lib/site-packages/py2exe/samples. Look in the advanced samples subdirectory, and you'll find a setup.py used for compiling wxPython applications. In this file, there's a rather telling section of code:
################################################################
# A program using wxPython

# The manifest will be inserted as resource into test_wx.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
Is that of any help?
Arevos is offline   Reply With Quote
Old Jun 2nd, 2006, 8:30 AM   #23
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
You might know this already, but in py2exe if use something like:

setup(console=["script.py"])

you'll get the console. but, if on the py2exe there is this:
Quote:
The above setup script creates a console program, if you want a GUI program without the console window, simply replace console=["myscript.py"] with windows=["myscript.py"].
helpful, i hope.
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Old Jun 2nd, 2006, 10:21 AM   #24
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
Originally Posted by Sane
My GUI containing three windows and a system tray icon totalled over 1000 lines. . .
I bet you I could create three windows and a system tray in 10 lines. It all depends on the functionality of those windows the controls they contain.
Cerulean is offline   Reply With Quote
Old Jun 2nd, 2006, 4:29 PM   #25
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,013
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Thanks Megamind and Arevos, those were precisely the things I needed.

And Cerulean, the controls are actually quite intricite. I won't get in to it though.

I'll be posting a thread in the Job Offers forum about this in the next few hours.
Sane is offline   Reply With Quote
Old Jun 2nd, 2006, 6:57 PM   #26
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
Glad to be of help
__________________
Tetris is so unrealistic
megamind5005 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC