win32com - server path error = newbie question

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


> That is very strange.  What is the contents of your win32com\server
> directory?
>
> Mark.

Hi Mark
thnks for your interest..

>>> import os
>>> serverpath = os.listdir('c:\program files\python\win32com\server')
>>> serverpath
['__init__.pyc', 'connect.py', 'dispatcher.py', 'exception.py',
'factory.py', 'localserver.py', 'policy.py', 'register.py', 'util.py',
'__init__.py', 'connect.pyc', 'dispatcher.pyc', 'exception.pyc',
'factory.pyc', 'localserver.pyc', 'policy.pyc', 'register.pyc', 'util.pyc']
>>>

Well it is very strange.. it works now....after hammering away all afternoon
without luck, I stopped for dinner, shut down all applications.
I checked the newgroup, and while composing this email fired up PythonWin.
I directly opened dictionary.py in the /servers folder adn bingo!
Then double checked with a demo of COMExplorerv1.6 and there under the DLL
servers is 'Python.Dictionary1' = yay.

All I can guess is that somehow hacking around this afternon with examples
from your book, I must have done a bad 'import from' which confused the
namesace. This is still the #1 gotcha I find to learning Python. I wish
there was some sort of XML styled namespace browser whcih would show one the
namespace and allow  turning it on or off in some nice way. When you knwo
what you are doing Python is great, but novices like me can easily screw
things up without even realizing or seeing what is going wrong.. I imagine
Python must have some very noce ways to allow expereinced users to se what
is going on with namespace. Do you knwo of any good tutuorials on this
workflow-learning aspect of using Python?

Zope has acquisition and  <dtml-with> which is cool, but ass-backwards
unless you use it right ;-)
VBscript has 'with' statement which imho is very nice as it saves a lot of
typing and makes things clearer because ther is not such an eyeful to
absorb. for example:

with someobject
    .method1
    .method2
    ' etc
end with

comments??

- Jason

PS. PPW32 is a very nice book.thanks.







More information about the Python-list mailing list