From: Phil E. <ph...@li...> - 2006-04-28 12:00:21
|
On Friday 28 Apr 2006 03:42, Daniel Ryan wrote: > All, > > I'm a newbie in the PythonCard world, and I'm encountering an error when I > use py2exe to create a stand-alone executable. My error log looks like > this: > Traceback (most recent call last): > File "GUI.py", line 555, in ? > File "PythonCard\model.pyc", line 337, in __init__ > File "PythonCard\resource.pyc", line 48, in getResource > File "PythonCard\resource.pyc", line 86, in __init__ > File "PythonCard\resource.pyc", line 91, in __init__ > File "PythonCard\resource.pyc", line 91, in __init__ > File "PythonCard\resource.pyc", line 96, in __init__ > File "PythonCard\resource.pyc", line 139, in enforceSpec > File "PythonCard\resource.pyc", line 30, in loadComponentModule > ImportError: cannot import module 'staticline > > Anybody encounter this before/know the way to fix it? > Yup - what you need to do is add a line into your code which explicitly imports the required PythonCard components. For your GUI.py program, you'll need to add something like: from PythonCard.components import staticline, statictext, textarea, \ button Since these are the components you've got in your GUI.rsrc.py file. Just FYI, I'm using your code to help debug the latest version of standaloneBuilder, with some help from Alex Tweedly. -- Regards Phil Edwards Brighton, UK |