|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
wxPython + py2exe = probs for me
Hey all,
I started leaning python this morning and I am unable to run my compiled gui applications. I have had no problems running the compiled command line applications. The error msgs I get are the following Before putting the resource file in the directory after compile --------------------------------------------------------------------------------------- test-app:128: UserWarning: PyCrust has been renamed to Py. Use 'from wx import py' Traceback (most recent call last): File "<string>", line 116, in ? File "PythonCardPrototype\model.pyc", line 202, in __init__ File "PythonCardPrototype\res.pyc", line 45, in __init__ File "PythonCardPrototype\util.pyc", line 30, in readAndEvalFile IOError: [Errno 2] No such file or directory: 'test-app.rsrc.py' After putting the resource file in the directory after compile --------------------------------------------------------------------------------------- test-app:128: UserWarning: PyCrust has been renamed to Py. Use 'from wx import py' Traceback (most recent call last): File "<string>", line 116, in ? File "PythonCardPrototype\model.pyc", line 202, in __init__ File "PythonCardPrototype\res.pyc", line 48, in getResource File "PythonCardPrototype\res.pyc", line 86, in __init__ File "PythonCardPrototype\res.pyc", line 91, in __init__ File "PythonCardPrototype\res.pyc", line 91, in __init__ File "PythonCardPrototype\res.pyc", line 96, in __init__ File "PythonCardPrototype\res.pyc", line 130, in enforceSpec File "PythonCardPrototype\res.pyc", line 30, in loadComponentModule ImportError: cannot import module 'gauge I searched through all the python code for 'import pycrust" and I did not see where I should change that, but I am not situated with python enough to know what the problems are related to the other errors. Any help is greatly appreciated. - Pete |
|
#2
|
||||
|
||||
|
The reason you can't find any referance to the PyCrust module in you're program is it's not being imported by your program (at least not directly), instead somewhere in one of the modules (in the wx library) you've imported uses it
..Anyway i'd think very carefully before you start renaming parts of this these modules , you'll probably end up in way over your head!Mark. |
|
#3
|
|||
|
|||
|
I searched the Python directory for the line that says to import the pycrust module, and all the of references were 'from wx import py' i never found a 'from wx import pycrust' so unless it is in a compiled part of the module i dont see how it can tell me to change it when it doesnt exist. Any ideas why I am getting the other errors tho?
Thanks |
|
#4
|
||||
|
||||
|
To be honest i have no idea why your getting any errors at all - i was just saying that just because your not importing it directly doesn't mean it isn't being used - i've used wxPython with Py2exe and i've never had a problem getting it to compile..
What version of Python/Py2exe/wxPython are you using? Mark. |
|
#5
|
|||
|
|||
|
I installed py2exe 0.4.2, Python 2.3, and wxPython 2.4.2.4
The application will compile fine, only errors i get when compiling are importing some modules, but I read that is standard or normal because they are placed in one of the dlls. These errors are only happening when I actually run the application. |
|
#6
|
||||
|
||||
|
Does your program work before you try compile it with Py2exe? Or are you saying that you have an exe, but you're getting an error message when you run it? If it worked before then at least we know the problem is to do with Py2exe! Python programs themselves dont need to be compiled..
Mark. |
|
#7
|
|||
|
|||
|
the program works fine before it is compiled, it is only after it is compiled that I have problems. It isn't a need since the script can run without being compiled I would just like to be able to if I needed to. Py2exe works fine as long as it doesnt need the wxPython modules
|
|
#8
|
||||
|
||||
|
Mmmm, sorry Digit i have no idea.. i've compiled a basic wxPython app before with no problems so it's a little comfusing that you cant!
You could try forcing Py2exe to include the modules but i dont know if this will work, you can find out a little more about this ("Flags to include or exclude modules or packages") on Py2exe's homepage (http://starship.python.net/crew/theller/py2exe/)Mark. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > wxPython + py2exe = probs for me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|