PythonCard and Py2Exe
It's me
itsme at yahoo.com
Wed Feb 23 01:36:19 EST 2005
It's:
from PythonCard.components import radiogroup
not just:
from PythonCard import radiogroup
"PipedreamerGrey" <pipedreamergrey at gmail.com> wrote in message
news:1109108628.859879.121020 at g14g2000cwa.googlegroups.com...
> I'm trying to create a standalone version (.exe) of PythonCard's Custdb
> sample using Py2Exe version 0.5.0. Everytime I attempt to compile the
> program, I get an error during compilation. This is the exact code I'm
> using in the setup file:
>
> from distutils.core import setup
> import py2exe
> setup( name = "custdb",
> console = ["custdb.py"],
> data_files = [ (".", ["custdb.ini", "custdb.de.rsrc.py",
> "custdb.rsrc.py", "customerdata.csv"]) ]
> )
>
> This is the error message I get when I run custdb.exe:
>
> Traceback (most recent call last):
> File "custdb.py", line 202, in ?
> app = model.Application(CustDbStack)
> 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 'radiogroup
>
> When I add "radiogroup" to the imports at the top of custdb.py, I get
> this error message:
>
> Traceback (most recent call last):
> File "custdb.py", line 18, in ?
> ImportError: cannot import name radiogroup
>
> This is line 18 in Custdb.py: from PythonCard import dialog, model,
> radiogroup
>
More information about the Python-list
mailing list