win32com - server path error = newbie question

Jason Cunliffe jasonic at nomadicsltd.com
Sat Aug 26 18:18:17 EDT 2000


Hello

I am working through the excellent Python Programming on Win32 book but have
stumbled on something very basic when  try out some of the come server
examples. I hope someone can help me resolve this so I can get up to speed..

1. page 68 there is an example: simpleCOMserver.py

Running this from PyWin produces error:

  File "C:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Program Files\Python\win32com\demos\connect.py", line 9, in ?
    import win32com.server.util
ImportError: No module named server.util

2. when I try to run any of the examples in the demos folder I also get same
error:

Traceback (innermost last):
  File "C:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Program Files\Python\win32com\demos\connect.py", line 9, in ?
    import win32com.server.util
ImportError: No module named server.util

I seems that PythonWin is not recognizing .server or other modules...
God I know this is so basic, but please what do I have to do to so code like
'import  win32com.server.util' will run ?



I know the basic win32com stuff is happening because I can merrily open, and
write and hide Access, Excel etc.. lovely.
I need to simple a simple Python COMponent which will allow me to pass data
from a GIS tool into Python Dictionaries. There is an example in 'servers'
folder called  'dictionary.py' which is a nice legup - but same  error as
before.

Thanks in advance for any help
- Jason
________________________________________________________________
Jason CUNLIFFE = NOMADICS.(Interactive Art and Technology).Design Director






More information about the Python-list mailing list