[Tutor] finding AcroRd32.exe - a better way ?

Terry Carroll carroll at tjc.com
Thu Nov 30 21:50:45 CET 2006


On Thu, 30 Nov 2006, Dave S wrote:

> My app generates an on the fly PDF manual by using reportlab, once generated I 
> would like it to be automatically opened and displayed by XP adobe reader.
> 
> Here's where I get stuck. ...
> 
> os.execv('E:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe', 
> ('/n', '/s', 'user.pdf'))
> 
> Does what I need and works great but I manualy searched around to find the 
> path to AcroRd32.exe. Short of writting some code to scan any adobe dirs for 
> this exe is there a more elegant way for me to ensure my app will work on any 
> windows machine ?

try this:

os.startfile('user.pdf')




More information about the Tutor mailing list