The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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 "", line 12, in ?
import os.path, string, Pmw
File "Csmilieython23Pmw\", line 35, in ?
ImportError: No module named Pmw_1_2.lib.PmwLoader

I did create by running I also find 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 ?