Launching Windows Programs
Andres Rosado
arosado at softhome.net
Sun Mar 2 20:11:14 EST 2003
On 02:56 AM 2/26/2003 -0500, python-list-request at python.org feed this fish
to the sharks:
>I need to launch a Powerpoing presentation from Python and see two ways of
>doing this:
> A COM interface that Powerpoint might have
> Launching it through command line
>Does anyone recommend a way to get this done?
If you know the filename in advance (or you can get it easy), then you can
launch it through command line if you have win32all extensions from Mark
Hammond.
It would look somthing like this:
win32api.ShellExecute(0, "open", '"' + ppFileName + '"', None, None, 1)
Where ppFileName is the PowerPoint filename. The "" surrounding it is
because the CL have trouble with spaces in the directory.
If you need to manipulate the presentation, then the COM interface is the
best alternative.
--
Andres Rosado
Email: andresr at despammed.com
ICQ: 66750646
Homepage: http://andres980.tripod.com/
Get my PGP key at http://andres980.tripod.com/pgp-key.asc
It is easier to resist at the beginning than at the end.
-- Leonardo da Vinci
More information about the Python-list
mailing list