Re: [python-win32] How do you find the Windows process ID of a COM server?

2008-02-16 Thread Marcus Low
This wont work on Vista. FindWindow is no longer an acceptable api to use. - Original Message - From: "Tim Roberts" <[EMAIL PROTECTED]> To: "Python-Win32 List" Sent: Thursday, February 14, 2008 3:14 AM Subject: Re: [python-win32] How do you find the Windows process ID of a COM server?

Re: [python-win32] Wrapper Windows Installer API functions, ctypes, .dll

2008-02-24 Thread Marcus Low
I love this community, you guys are really patient. Backslashes.. If you want to use single backslashed, you probably need to use "r" in front of the string http://docs.python.org/ref/strings.html I strongly recommend anyone new to python to get :- 1. learning python from Mark lutz 2. pytho

Re: [python-win32] Using .chm files.

2008-03-23 Thread Marcus Low
Hi, Are you just interested to launch the chm file to see the help content? Or are you using context sensitive reference? Launching is as simple as using shellexecute , the *.chm files will be launched correctly as though as you are double clicking on it... Marcus. - Original Message ---

Re: [python-win32] wmi query.

2008-03-24 Thread Marcus Low
Hi, > c = wmi.WMI() > for service in c.Win32_Service ('State == 'Stopped') I would think that using c.Win32_Service() and iterating would get you anything you want. In ur case of using ('State == 'Stopped') ... (if this ever works) c.Caption would have given you the caption Marcus. -

[python-win32] Threads in COM not given time to execute?

2008-03-31 Thread Marcus Low
Hi, I am testing a COM component, when i execute it under pythonwin idle and single stepping F10 to "SmtpMail.Start()" : SmtpMail = win32com.client.Dispatch("SomeSMTPCom") SmtpMail.Start() I can telnet to 127.0.0.1 25 and get a proper SMTP response But when i run the program i

Re: [python-win32] Threads in COM not given time to execute?

2008-03-31 Thread Marcus Low
Hi, Found the reason. The COM component in this case somehow depends on the windows message pump. while FlagToStop == False : win32gui.PumpMessages(); Solved the issue. Marcus. - Original Message - From: Marcus Low To: 'Python-Win32 List' Sent: Mon

[python-win32] A shameless COM question

2008-04-01 Thread Marcus Low
Hi, I am aggressively trying to try and use python for my team's sub commercial project. However we are using a com component and i have the example given in C#. It looks very simple to use and elegent in C# but i need to do the same in python (minus the GUI of course) The C# example is : http

Re: [python-win32] A shameless COM question

2008-04-01 Thread Marcus Low
ist" Sent: Wednesday, April 02, 2008 6:07 AM Subject: Re: [python-win32] A shameless COM question > Marcus Low wrote: >> Hi, >> >> I am aggressively trying to try and use python for my team's sub >> commercial project. However we are using a com component and i ha

Re: [python-win32] A shameless COM question

2008-04-03 Thread Marcus Low
Osuch" <[EMAIL PROTECTED]> To: "Marcus Low" <[EMAIL PROTECTED]> Sent: Thursday, April 03, 2008 11:57 AM Subject: Re: [python-win32] A shameless COM question > On Wed, Apr 2, 2008 at 2:38 AM, Marcus Low <[EMAIL PROTECTED]> > wrote: > >> >> >

Re: [python-win32] A shameless COM question

2008-04-03 Thread Marcus Low
L PROTECTED]> To: "Python-Win32 List" Sent: Friday, April 04, 2008 12:44 AM Subject: Re: [python-win32] A shameless COM question > Marcus Low wrote: >> Hi Waldemar, >> >> Thanks, i have bought the twisted book and the journey begin. The COM >> was &

Re: [python-win32] A shameless COM question (can we close this?)

2008-04-04 Thread Marcus Low
Hi Mark, > Don't underestimate the complexity of writing > asynchronous IOCP based applications in *any* language - just because > something is written in C# and *only* targets one way of handling sockets > doesn't make it the best or most reliable solution. No doubt even given the best mechanism

Re: [python-win32] Get listening ports

2008-06-28 Thread Marcus Low
Hi, Yup ip helpers the way, but alternatively if u want a simple routine, u can launch the netstat -a -b after u createprocess with the appropriate flags and pipe the information to ur buffer, then just parse the buffer and get the information, all these can be done without seeing an ugly cmd

Re: [python-win32] Get listening ports

2008-06-30 Thread Marcus Low
Excellent find. Hmm..i think we might have enough new win32 recipes and content to warrant a new book on Python for Windows programming. The last book was like ...8 years ago? (well ya i know this topic have pop-up way too many times) Tim Golden wrote: le dahut wrote: I've found this : http:

[python-win32] strange crashed on calling loaded shared Library in windows

2008-07-07 Thread Marcus Low
I have this shared library that is loaded via : vr = ctypes.CDLL("varcfunction.dll") When i ran it thru main : if __name__ == "__main__" : str = "a" LR = vr.DoIt(str) print "results %d" %(LR) It works perfectly fine and the return result was correct. I could loop it 1000 times w

Re: [python-win32] strange crashed on calling loaded shared Library in windows

2008-07-07 Thread Marcus Low
One more thing, maybe that is the cause, the vr = ctypes.CDLL was called by a different thread then the one using it in the 2nd scenario. Hmm...could this be the problem. Marcus Low wrote: I have this shared library that is loaded via : vr = ctypes.CDLL("varcfunction.dll") Whe

[python-win32] ctypes question DLL

2008-07-07 Thread Marcus Low
Hi, I have been reading the documentation on ctypes and the 2.5 python on ctypes when it comes to loading libraries. But surprisingly, or maybe i miss it somewhere, but How do you unload the loaded dll? For eg : dllfunc = ctypes.CDLL("mylib.dll") Later if i want to replace this dll without

Re: [python-win32] scripting pythonwin

2008-07-12 Thread Marcus Low
Bob, Do you mean u want to control pythonwin ide itself as somekind of automation? Else whether its MFC or wxPython, those are for you to develop windows native like apps where u get to do all those thing that u list. If you want to control pythonwin, then its another story. Marcus. bob gail