New user question: py2exe with Pmw 
Author Message
 New user question: py2exe with Pmw

Hi,

I have a pretty basic piece of python code that uses the Pmw and Tcl/Tk
modules that I'm trying to run through py2exe.  The Tcl/Tk portion works
just fine, but when I enable the Pmw portion the executable won't run
anymore, failing with the message:

Traceback (most recent call last):
  File "imputil.pyc", line 103, in _import_hook
  File "<string>", line 52, in _import_top_module
  File "imputil.pyc", line 216, in import_top
  File "imputil.pyc", line 271, in _import_one
  File "<string>", line 128, in _process_result
  File "Pmw\__init__.pyc", line 37, in ?
IndexError: list index out of range

It looks to me like Pmw was not included, but I'm not sure. There's a tcl
directory created in the dist directory, but nothing for Pmw.  I looked
through
the docs for py2exe and it says it can do Pmw just fine, but I couldn't find
any other information on how to do this.  My setup file for the distro looks
like
this:

from distutils.core import setup
import py2exe

setup(
    scripts=["myscript.py"]
)

It's just the basic script from the examples... do I need to include some
more
information for py2exe to find the modules properly?

Thanks,
  Greg Armstrong



Tue, 19 Oct 2004 05:23:42 GMT  
 New user question: py2exe with Pmw
Quote:

> Hi,

> I have a pretty basic piece of Python code that uses the Pmw and Tcl/Tk
> modules that I'm trying to run through py2exe.  The Tcl/Tk portion works
> just fine, but when I enable the Pmw portion the executable won't run
> anymore, failing with the message:

> Traceback (most recent call last):
>   File "imputil.pyc", line 103, in _import_hook
>   File "<string>", line 52, in _import_top_module
>   File "imputil.pyc", line 216, in import_top
>   File "imputil.pyc", line 271, in _import_one
>   File "<string>", line 128, in _process_result
>   File "Pmw\__init__.pyc", line 37, in ?
> IndexError: list index out of range

> It looks to me like Pmw was not included, but I'm not sure.

You have to prepare Pmw for this before it will work.
There's a script named 'bundlepmw' in Pmw's distribution,
also a readme file explaining how to use it.

HTH,

Thomas



Tue, 19 Oct 2004 14:40:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. py2exe & Pmw

2. py2exe + Pmw = my problem

3. Pmw.Counter and Pmw.ScrolledCanvas questions

4. New to Python, Tkinter - Question about Pmw

5. New User Question

6. Q: new user questions

7. 2 Basic questions from a new user

8. Question on Clarion 5 and Internet (i am new user)

9. New Clarion User. I have a graphics question

10. Questions from new cw2.0 user

11. New forth user question

12. Screen load order? -- New user question

 

 
Powered by phpBB® Forum Software