Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3334668
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:55:50+00:00 2026-05-17T23:55:50+00:00

I am not sure where to even begin describing the issue I’m having. I

  • 0

I am not sure where to even begin describing the issue I’m having.

I have a project which uses a large number of images. Toolbars, Menus, Lists, etc. I’m developing in Eclipse with PyDev. I’m able to run my program from within Eclipse successfully, but will need to compile it to an executable so it can be deployed.

When I first attempted to compile using Py2Exe none of my images loaded because they were using relative paths. I found information here: http://www.daniweb.com/forums/thread255458.html with information about how to turn relative paths into absolute paths, but opted not to go that route as it required an extra wrapper on all image paths.

Instead, I opted to use Img2Py to convert all of my images into Resource Files. I now have a resource folder that contains .py files for each image that’s required by my application. When re-compiling with Py2Exe I am able to verify that the library.bin zip file contains my resource folder and the corresponding .pyo files for each image. When I launch my executable most of my images do not display. On my Toolbars, for example, Enabled state images are shown properly while Disabled state images are missing. In my Lists none of my images display at all. In the Menus images appear properly.

In my Toolbar class, if I leave off the Disabled Images and instead allow wx to use it’s default behavior to gray the Enabled Images the Disabled state displays, but that doesn’t help me with my List Icons. I’m not even sure what code is relevant to show here – everything works properly in Eclipse, it’s only after compiling using Py2Exe that I encounter these issues.

Any suggestions or advice will be much appreciated. Thanks in advance,

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:55:51+00:00Added an answer on May 17, 2026 at 11:55 pm

    I was able to overcome this by adding the append=True option to my calls to img2py and by removing underscores in the image module names. I don’t understand why this had an effect considering that the images that worked also contained underscores in their names, but it appears to have allowed me to step around the problem. My code to generate the Images resource ends up being this:

    from wx.tools.img2py import img2py
    from glob import glob
    
    for f in glob('*.png'):
      o = f.replace('-', '').replace('_', '').replace('.png', '')
      img2py(f, 'Images.py', append=True, imgName=o, icon=True)
    

    Hopefully this may prove useful to someone else in the future. I know I’ll end up referring back to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not even sure how to begin wording this question, but basically, I have
To begin with, I'm not even sure, if it is the right way to
Not even sure I'm stating the question correctly. Here's the situation. I have a
I'm not sure where to even begin solving this, but I'm getting an exception
This is a weird bug, and I'm not even sure how to begin figuring
I need to write a query and I'm not even sure where to begin
I'm not even sure where to begin with this question... I want to be
I'm not sure where to even begin to fix this myself, so I am
Not even sure how to explain this but I connect to a remote computer
Im not even sure how to ask this question, but i'll give it a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.