[python-win32] context_menu.py crashing Explorer

Mark Hammond skippy.hammond at gmail.com
Thu Apr 17 03:48:37 CEST 2014


As far as seeing the print statements, you can modify the source file to 
have "import win32traceutil" at the top, and in another console run 
"python -m win32traceutil" - the print statements from the source file 
should them appear in the console running win32traceutil.

However, I don't think this will help you find the crash - it might let 
you see what *does* work, but probably not what doesn't.  Ideally you 
would attach explorer to a debugger and see where it crashes - even 
without debug symbols you might get some clues as to where it is 
crashing.  Given your other alternative is to write a shell extension in 
c++, you probably already have access to the tools necessary.

HTH,

MArk

On 17/04/2014 1:30 AM, Bob Hood wrote:
> As a follow-up, a clean install of Windows 7, Python 2.7.6 and pywin32 2.18 in
> a Virtual Machine does not exhibit this behavior.  The Python extension
> actually works in Explorer.
>
> So, it would seem that some other currently installed extension might be
> colliding with this.  However, I'd still like some pointers on how to debug
> this Python-based extension if anybody has them, so I won't have to resort to
> writing it in C++.
>
>
> On 4/15/2014 8:04 PM, Bob Hood wrote:
>> Hi, everybody.
>>
>> I'm having an issue with the context_menu.py example included with pywin32
>> (2.18) under Python 2.7.6.  I register it by running it ("python
>> context_menu.py --register"), but then, when I right-click on a Python file,
>> my Explorer process terminates.  I've tried variations (some enhanced examples
>> I've found on stackoverflow, for example), and they all exhibit the same behavior.
>>
>> 1. Has anybody else run into this?
>> 2. Is there an example out there that actually works?
>> 3. If not, any suggestions on how I can debug this to figure out exactly what
>> is causing the issue?  I see there are some print statements in the module (so
>> I might be able to do printf-debugging) but I don't know where that output is
>> going.
>>
>> Thanks for any help.
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> https://mail.python.org/mailman/listinfo/python-win32
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>



More information about the python-win32 mailing list