[Tkinter-discuss] Re: py2exe and Pmw - help please

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Tue Sep 28 11:19:07 CEST 2004


On Fri, 24 Sep 2004 12:01:25 +0100, David Vaughan  
<David.Vaughan at Gifford.UK.com> wrote:

>
> I'm sure you've had this query before, and I did try lots of googling,
> but I still haven't got there...
>
> I have a program which uses Tkinter and Pmw, and it works fine in the
> interpreter.  I have used py2exe
> succesfully on non-gui programs.  And I have created Pmw.py using
> bundlepmw.py.  But, wherever I put
> Pmw.py (and PmwBlt.py and PmwColor.py), I get the same message on
> running the executable as if I hadn'd
> bothered hooking up Pmw at all:
>
> Traceback (most recent call last):
>   File "newproj.py", line 21, in ?
>   File "Pmw\__init__.pyc", line 28, in ?
> WindowsError: [Errno 3] The system cannot find the path specified:
> 'C:\\data\\Software\\Python\\newproj\\v2_1\\dist\\library.zip\\Pmw/*.*'
>

I guess one question would be how do you import Pmw in your application.
I have created a Tkinter + Pmw py2exe application I didn't do anything
special.  I too had a Pmw.py and PmwColor.py bundle both these files are
are in a sub-directory (and package) called Pmw, this package also has
a __init__.py file.  The contents of the __init__.py file are:-


# __init__.py Pmw Package

 from Pmw import *


The setup.py I used looked like this:-


# setup.py
 from distutils.core import setup
import py2exe

setup(windows=["MyApplication.pyw"])


And it just worked....

Inside the main application module I import Pmw like so:

import Pmw


So again nothing special....

Sorry I can't be of more help....


Martin

-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



More information about the Tkinter-discuss mailing list