[python-win32] Seven 64bits and system32/syswow64 paths

2012-03-02 Thread le dahut
Hi. On a Windows Seven 64bits host with 32bits version of python installed. In a MSDOS prompt I run : nbtstat -R command runs well. In a python prompt I run : import os os.system('nbtstat -R') I get : "nbtstat is not recognized as an internal or external command" Using explorer I've f

Re: [python-win32] Seven 64bits and system32/syswow64 paths

2012-03-02 Thread le dahut
Sorry, I thought it was related to python but actually not : http://msdn.microsoft.com/en-us/library/aa384187%28v=vs.85%29.aspx On 03/02/2012 11:38, le dahut wrote : Hi. On a Windows Seven 64bits host with 32bits version of python installed. In a MSDOS prompt I run : nbtstat -R command runs w

Re: [python-win32] Seven 64bits and system32/syswow64 paths

2012-03-02 Thread Tim Roberts
le dahut wrote: > Using explorer I've found "nbtstat.exe" in C:\Windows\System32. > > In a MSDOS prompt : >dir C:\Windows\System32\nbtstat.exe > finds the file. > > In a python prompt : >os.system('dir C:\\Windows\\System32\\nbtstat.exe') > returns "File not found". > > It seems that : > *

[python-win32] Context menu troubles

2012-03-02 Thread Chris Ness
disclaimer: I have only the faintest idea what I'm doing! I'm trying to get a windows explorer context menu in my app. I can get the menu to show, but it does not execute any commands (e.g. 'copy') my code is based on http://bcbjournal.org/articles/vol4/0006/Using_the_shell_context_menu.htm a

Re: [python-win32] Context menu troubles

2012-03-02 Thread Tim Roberts
Chris Ness wrote: > disclaimer: I have only the faintest idea what I'm doing! > > I'm trying to get a windows explorer context menu in my app. I can get > the menu to show, but it does not execute any commands (e.g. 'copy') Right, because you haven't told it to. You implemented the stuff form th

Re: [python-win32] Context menu troubles

2012-03-02 Thread Chris Ness
Thanks for reply Tim. I had decided not to use the command ID technique until I got things working, so TPM_RETURNCMD was commented out when I defines flags. From my understanding of MSDN and pywin32, this should make commands immediately execute and cause TrackPopupMenu to return an HRESULT?

Re: [python-win32] Context menu troubles

2012-03-02 Thread Chris Ness
Also, the first article mentions OleInitialise(), which I tried but pythoncom.OleInitialise() does not exist in the module (AttributeError), despite what the docs say? Chris. ___ python-win32 mailing list python-win32@python.org http://mail.python.or

Re: [python-win32] Context menu troubles

2012-03-02 Thread Tim Roberts
Chris Ness wrote: > I had decided not to use the command ID technique until I got things > working, so TPM_RETURNCMD was commented out when I defines flags. From > my understanding of MSDN and pywin32, this should make commands > immediately execute and cause TrackPopupMenu to return an HRESULT?

Re: [python-win32] Context menu troubles

2012-03-02 Thread Chris Ness
Aah. It makes sense now. messages and such like. my lack of knowledge of win32 shows. I'll let you know how I get on. Am I right in thinking the win32 api is awfull? Chris. On 02/03/2012 20:16, Tim Roberts wrote: Chris Ness wrote: I had decided not to use the command ID techniqu