Re: [python-win32] problem creating a simple COM server

2007-11-13 Thread Michel Claveau
Hi! With this Python's script : import win32com.client pyRegex = win32com.client.Dispatch('PythonModule.re') r1 = pyRegex.pyfindall("\\d", "a1b2c3") print r1 r2 = pyRegex.pysplit("\\d", "a1b2c3") print r2 Your code run OK. Therefore the problem is on your VBA side. And, so

Re: [python-win32] problem creating a simple COM server

2007-11-13 Thread Kelie
Larry Bates websafe.com> writes: > I made the following small changes (but only to the VB program) and it runs > without any errors for me: > > -Larry > Larry, Thanks for your reply. I'm getting the same error with your revised code. Other than adding MsgBox calls, did you make other changes?

Re: [python-win32] problem creating a simple COM server

2007-11-13 Thread Larry Bates
Kelie wrote: > Hello group, > > Following the example in Mark's book, I tried creating a simple COM server > exposing two methods from the re module. But could not get it to work. Here is > the code: > > class PythonModule_re: > _public_methods_ = ['pyfindall', 'pysplit'] > _reg_progid_ =

Re: [python-win32] Logging off of windows

2007-11-13 Thread Matt Herbert (matherbe)
Thanks Roger, That worked perfectly! import win32ts for s in win32ts.WTSEnumerateSessions(win32ts.WTSOpenServer("."),1): if s['State'] == win32ts.WTSActive: print "Session is active" -Matt > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Beha

[python-win32] problem creating a simple COM server

2007-11-13 Thread Kelie
Hello group, Following the example in Mark's book, I tried creating a simple COM server exposing two methods from the re module. But could not get it to work. Here is the code: class PythonModule_re: _public_methods_ = ['pyfindall', 'pysplit'] _reg_progid_ = "PythonModule.re" # NEVER