Thank you. That works!

By the way there is a few more things I find out in order to package shell  
extension with py2exe. It has to be built as an in-process COM server. So  
I have added this in the setup.py


context_menu_handler = Target(
     description = "Context Menu Handler",
     # what to build.  For COM servers, the module name (not the
     # filename) must be specified!
     modules = ["minds.weblib.win32.context_menu"],
     create_exe = False,
##    create_dll = False,
     )

setup(
     ...                
     com_server = [context_menu_handler],
     ...)

wy


> aurora <[EMAIL PROTECTED]> writes:
>
>> I use win32com.shell. There are something special going on I don't
>> understand. Notice the commands below. I imported win32com.shell. But  
>> the
>> module is being loaded from win32comext\shell\__init__.pyc.
>>
>>>>> import win32com.shell
>>>>> win32com.shell
>> <module 'win32com.shell' from
>> 'c:\Python24\Lib\site-packages\win32comext\shell\__init__.pyc'>
>>
>> What is the mechanism to make this happen?
>
> It is __path__ trickery in win32com\__init__.py:
>
> c:\>py24
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on  
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import win32com
>>>> win32com.__path__
> ['c:\\python24\\lib\\site-packages\\win32com',  
> 'c:\\python24\\lib\\site-packages\\win32comext']
>>>>
>
>
>> I am digging into this because when I try to use py2exe, I got this
>> error:
>>
>> The following modules appear to be missing
>> ['win32com.shell']
>
>
> http://starship.python.net/crew/theller/moin.cgi/WinShell
>
> Thomas


_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to