[Tutor] Calling Python Programs from Word, pdfs, etc

Alan Gauld alan.gauld at btinternet.com
Fri Sep 5 10:31:05 CEST 2008


"Jim Morcombe" <jmorcombe at westnet.com.au> wrote

>I am thinking about some long term teaching aids, so I'm simply 
>interested in whether these things can be done.  I don't need to know 
>how yet.
>
> 1.  Is it possible to invoke a Python Program from some kind of link 
> in a Word document, similar to the way a Java Applet is run from a 
> Web Page.  Obviously I am thinking about a Windows enviroinment 
> only.  (I guess I'm probably asking if an exe file can be launched 
> from Winows)

Yes just as youd run any program from any VBA enabled program.
You need to trigtger the VBA macro from the Word document and
it then runs the external command. Its fairly easy.

> 2.  How about from a pdf document?

Probably but I don;t know enough about the scripting options of PDF.
You would certainly need the full Adobe acrobat authoring kit I 
suspect.
ISTR that Acrobat can use actionscript in recent versions, but that
may be wrong and anyhow I know nothing about Actionscript!

> 3.  I've never used any ebook creation software (and this is 
> probably not the right place to ask) but does anyone have any 
> experience with ebooks that launch Python Applications?

No, sorry.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list