niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » python
FW: executing VBScript from Python and vice versa
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Tim Hoffman
*nix forums beginner


Joined: 11 Jun 2005
Posts: 6

PostPosted: Sat Feb 05, 2005 9:12 am    Post subject: Re: FW: executing VBScript from Python and vice versa Reply with quote

PythonWin 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)]
on win32.
Portions Copyright 1994-2004 Mark Hammond (mhammond@skippinet.com.au) -
see 'Help/About PythonWin' for further copyright information.
Quote:
from win32com.client import Dispatch
x = Dispatch("MSScriptControl.ScriptControl")
x.Language='VBScript'
x.AddCode("""Function HelloWorld
.... HelloWorld = "hello world"

.... End Function
.... """)
Quote:

x.Eval("HelloWorld")
u'hello world'


Valentina Boycheva wrote:
Quote:
Thanks for the reply. I already have "Learning Python" from Mark Lutz and
David Ascher, which covers 2.3 (I am in 2.4). However, it seems like heavy
artillery to me. What I want is, for instance, run a VBScript to get a
function output and feed it to the Python script that called it. The reason
is that because I feel more comfortable with VBScript and have written a
small library of useful utilities, I don't want it to become obsolete. In
the mean time I did more reading and found a couple of prospective
alternatives - popen and os.system(command). Still need to work out how to
use them...

-----Original Message-----
From: aurora [mailto:aurora00@gmail.com]
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 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 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
have
exactly 4 days of experience in Python (and fortunately, much more in
VB6)

Thanks.



Back to top
Valentina Boycheva
*nix forums beginner


Joined: 04 Feb 2005
Posts: 4

PostPosted: Fri Feb 04, 2005 8:05 pm    Post subject: FW: executing VBScript from Python and vice versa Reply with quote

Thanks for the reply. I already have "Learning Python" from Mark Lutz and
David Ascher, which covers 2.3 (I am in 2.4). However, it seems like heavy
artillery to me. What I want is, for instance, run a VBScript to get a
function output and feed it to the Python script that called it. The reason
is that because I feel more comfortable with VBScript and have written a
small library of useful utilities, I don't want it to become obsolete. In
the mean time I did more reading and found a couple of prospective
alternatives - popen and os.system(command). Still need to work out how to
use them...

-----Original Message-----
From: aurora [mailto:aurora00@gmail.com]
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 Robinson today.

http://www.oreilly.com/catalog/pythonwin32/

It has everything you need.

Quote:
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
have
exactly 4 days of experience in Python (and fortunately, much more in
VB6)

Thanks.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 9:41 pm | All times are GMT
navigation Forum index » Programming » python
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Python proficiency test Kent Johnson python 0 Fri Jul 21, 2006 10:47 am
No new posts Permission denied executing apachectl Josep Sanmarti Apache 1 Fri Jul 21, 2006 10:06 am
No new posts Since there was talk of if-then-else not being allowed in... Casey Hawthorne python 5 Fri Jul 21, 2006 3:41 am
No new posts Column info without executing query Dan Strömberg PostgreSQL 10 Thu Jul 20, 2006 6:21 pm
No new posts Using python code from Java? fortepianissimo python 4 Thu Jul 20, 2006 5:36 pm

Loans | Aishwarya Rai | Credit Counseling | Guitar Lessons | Car Finance
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1761s ][ Queries: 20 (0.1004s) ][ GZIP on - Debug on ]