PythonCard and Py2Exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PipedreamerGrey

    #1

    PythonCard and Py2Exe

    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.c sv"]) ]
    )


    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.Applicati on(CustDbStack)
    File "PythonCard\mod el.pyc", line 337, in __init__
    File "PythonCard\res ource.pyc", line 48, in getResource
    File "PythonCard\res ource.pyc", line 86, in __init__
    File "PythonCard\res ource.pyc", line 91, in __init__
    File "PythonCard\res ource.pyc", line 91, in __init__
    File "PythonCard\res ource.pyc", line 96, in __init__
    File "PythonCard\res ource.pyc", line 139, in enforceSpec
    File "PythonCard\res ource.pyc", line 30, in loadComponentMo dule
    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

Working...