Re: executing VBScript from Python and vice versa

2005-02-10 Thread Valentina Boycheva
A while ago I asked how VBScript can be called from Python. The two answers I received suggested using win32com.client and MSScriptControl.ScriptControl. This solution required embedding the VBScript code inside the Python script. Here's a shell approach that runs an existing VBScript file: Pyth

Re: executing VBScript from Python and vice versa

2005-02-07 Thread Valentina Boycheva
Thanks to Michel Claveau and Paul Paterson for providing examples on how to use ScriptControl to embed VBScript in Python script. I've only tried this once before on another occasion and it was fascinating to see how a function generates another function! Valentina -- http://mail.python.org/mai

Re: FW: executing VBScript from Python and vice versa

2005-02-05 Thread Tim Hoffman
nd os.system(command). Still need to work out how to use them... -----Original Message----- From: aurora [mailto:[EMAIL PROTECTED] Sent: Friday, February 04, 2005 3:28 PM To: python-list@python.org Subject: Re: executing VBScript from Python and vice versa Go to the bookstore and get a copy

Re: executing VBScript from Python and vice versa

2005-02-05 Thread News M Claveau /Hamster-P
Cool. :-) And it's OK, also, for JScript (MS-Javascript) : import win32com.client vbs = win32com.client.Dispatch("ScriptControl") vbs.language = "vbscript" scode="""Function mul2(x) mul2=x*2 End Function """ vbs.addcode(scode) print vbs.eval("mul2(123)") js = win32com.client.Dispatch("ScriptC

Re: executing VBScript from Python and vice versa

2005-02-04 Thread Paul Paterson
Valentina Boycheva wrote: Is there a way to make programs written in these two languages communicate with each other? I am pretty sure that VBScript can access a Python script because Python is COM compliant. On the other hand, Python might be able to call a VBScript through WSH. Can somebody provi

FW: executing VBScript from Python and vice versa

2005-02-04 Thread Valentina Boycheva
how to use them... -Original Message- From: aurora [mailto:[EMAIL PROTECTED] Sent: Friday, February 04, 2005 3:28 PM To: python-list@python.org Subject: Re: executing VBScript from Python and vice versa Go to the bookstore and get a copy of Python Programming on Win32 by Mark Hammond, Andy

Re: executing VBScript from Python and vice versa

2005-02-04 Thread aurora
Go to the bookstore and get a copy of Python Programming on Win32 by Mark Hammond, Andy Robinson today. http://www.oreilly.com/catalog/pythonwin32/ It has everything you need. Is there a way to make programs written in these two languages communicate with each other? I am pretty sure that VBScr

executing VBScript from Python and vice versa

2005-02-04 Thread Valentina Boycheva
Is there a way to make programs written in these two languages communicate with each other? I am pretty sure that VBScript can access a Python script because Python is COM compliant. On the other hand, Python might be able to call a VBScript through WSH. Can somebody provide a simple example? I hav