whwang (2) [Avatar] Offline

I am new to Python and I am trying to run an old program. I do not know what version this old program was running back in 2001 ( I know it was run successfully). I got the source codes from the office and I downloaded Python 2.3 and Pmw 1.2. when ran the program I got the following message

Traceback (most recent call last):
File "BidderUI.py", line 12, in ?
import os.path, string, Pmw
File "Csmilieython23Pmw\__init__.py", line 35, in ?
ImportError: No module named Pmw_1_2.lib.PmwLoader

I did create Pmw.py by running bunddlepmw.py. I also find PmwLoader.py under the PMW_1_2/lib directory. Does anyone know how to fix this? did I miss any steps ?


midtoad (4) [Avatar] Offline
Re: Question on PMW dynamic loader for 1.2 in XP
you don't need to run bundlepmy in order to run Pmw; it runs directly after installation without any other steps. just add 'import Pmw' to the top of your app and it should go. If it complains that it can't find Pmw, then add a reference to the parent folder of Pmw. For instance, if Pmw is installed in c:programsPmw, then add:
sys.path[:0] = ['C:\Programs']
whwang (2) [Avatar] Offline
Re: Question on PMW dynamic loader for 1.2 in XP

thanks for your reply. It is true that it can't find Pmw since I do have import PMW in the beginning of the file. Where should I add

sys.path[:0] = ['Csmilieython23']

do I need to set up any lib path in XP ?