On Wed, 29 Nov 2000 13:46:43 -0500, [EMAIL PROTECTED] wrote:
>On 29 Nov 2000, at 10:30, Paul Prescod wrote:
>> Biju Ramachandran wrote:
>> > How do I execute another applications command using Active Python -
for
>> > example - the equivalent in Perlscript is
>> >    $Application - > <command>
>> 
>> Could you give an actual example? Are you perhaps invoking a COM
method
>> on an object?
> 
>I think Biju is looking for the os.exec* commands, or the pipe 
>commands. I don't remember my Perl very well, but I think the 
>command executes a program (system) and traps the output.
> 
>Tim

>From someone who is familiar with Perl (but a newbie in
Python), here's a snippet of Perl code which uses the syntax that
Biju refers to:

        use Win32::OLE;
        my $xl = Win32::OLE->new('Excel.Application', 'Quit');
        my $book = $xl->Workbooks->Open('c:\My Documents\Perl\test.xls');

This example uses Perl's interface to OLE/COM/ActiveX. The equivalent
for Python would use win32com, correct? Sorry, I'm too new to Python
to do the translation.

Jonathan D Johnston
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to