Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old May 16th, 2006, 04:55 PM
redefined.horizons@gmail.com
Guest
 
Posts: n/a
Default Help System For Python Applications

I did some searching for this topic, but couldn't find anything. A
search of this list only turned up an old post from 2002.

I'd like to add a comprehesive help system to my Python Application. By
"comprehensive" I mean regular "read-like-a-book" help and context
sensitive help that can be launched from the application.

Is there an existing system in Python that would support this, or would
I need to start from scratch?

On a related note, is there a way to fire up Adobe's Acorbat Reader or
and Web Browser from Python and have the external application open a
specified PDF or HTML file? (For example, I want to open the file
"myhelp.pdf" in reader from Python code.)

Could you give me an example of the code that would do this?

Thanks for all the help on my help. :]

Scott Huey

  #2  
Old May 16th, 2006, 05:25 PM
johnzenger@gmail.com
Guest
 
Posts: n/a
Default Re: Help System For Python Applications


redefined.horizons@gmail.com wrote:[color=blue]
> On a related note, is there a way to fire up Adobe's Acorbat Reader or
> and Web Browser from Python and have the external application open a
> specified PDF or HTML file? (For example, I want to open the file
> "myhelp.pdf" in reader from Python code.)[/color]

The webbrowser module lets you open any page. HTML will open in the
user's default web browser; PDF opens in Acrobat (at least on my
Windows machine).
[color=blue][color=green][color=darkred]
>>> import webbrowser
>>> webbrowser.open(r"C:\\helpfile.pdf")[/color][/color][/color]

  #3  
Old May 16th, 2006, 05:25 PM
Harold Fellermann
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

I usually go for the webbrowser package that allows me to launch the
systems webbrowser and opens my html help files. It is really simple:
[color=blue][color=green][color=darkred]
>>> import webbrowser
>>> webbrowser.open("file:///path_to/help.html#topic")[/color][/color][/color]

and thats all there is to do.

- harold -

  #4  
Old May 16th, 2006, 05:25 PM
bruno at modulix
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

redefined.horizons@gmail.com wrote:[color=blue]
> I did some searching for this topic, but couldn't find anything. A
> search of this list only turned up an old post from 2002.
>
> I'd like to add a comprehesive help system to my Python Application. By
> "comprehensive" I mean regular "read-like-a-book" help and context
> sensitive help that can be launched from the application.
>
> Is there an existing system in Python that would support this, or would
> I need to start from scratch?[/color]

This depends on the system and UI, so their can be no one-size-fits-all
builtin solution. Hint : look at how other programs using the same
system and UI solved the problem.
[color=blue]
> On a related note, is there a way to fire up Adobe's Acorbat Reader or
> and Web Browser from Python and have the external application open a
> specified PDF or HTML file? (For example, I want to open the file
> "myhelp.pdf" in reader from Python code.)[/color]

os.system() may be a good start.

HTH
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb@xiludom.gro'.split('@')])"
  #5  
Old May 16th, 2006, 05:35 PM
redefined.horizons@gmail.com
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

Thanks for the responses. I'll check out the web browser module, and
I'll make sure that I release any work ona help system to the
community.

Scott Huey

bruno at modulix wrote:[color=blue]
> redefined.horizons@gmail.com wrote:[color=green]
> > I did some searching for this topic, but couldn't find anything. A
> > search of this list only turned up an old post from 2002.
> >
> > I'd like to add a comprehesive help system to my Python Application. By
> > "comprehensive" I mean regular "read-like-a-book" help and context
> > sensitive help that can be launched from the application.
> >
> > Is there an existing system in Python that would support this, or would
> > I need to start from scratch?[/color]
>
> This depends on the system and UI, so their can be no one-size-fits-all
> builtin solution. Hint : look at how other programs using the same
> system and UI solved the problem.
>[color=green]
> > On a related note, is there a way to fire up Adobe's Acorbat Reader or
> > and Web Browser from Python and have the external application open a
> > specified PDF or HTML file? (For example, I want to open the file
> > "myhelp.pdf" in reader from Python code.)[/color]
>
> os.system() may be a good start.
>
> HTH
> --
> bruno desthuilliers
> python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
> p in 'onurb@xiludom.gro'.split('@')])"[/color]

  #6  
Old May 16th, 2006, 05:35 PM
Paul Boddie
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

bruno at modulix wrote:[color=blue]
> redefined.horizons@gmail.com wrote:
>[color=green]
> > On a related note, is there a way to fire up Adobe's Acorbat Reader or
> > and Web Browser from Python and have the external application open a
> > specified PDF or HTML file? (For example, I want to open the file
> > "myhelp.pdf" in reader from Python code.)[/color]
>
> os.system() may be a good start.[/color]

Take a look at the desktop module for a partial solution:

http://www.python.org/pypi/desktop

An example:

import desktop
desktop.open("itools-0.9.0.pdf")

Apparently, os.startfile will expose (or already exposes) other
parameters which may specify that the file be printed, amongst other
things. I may well add such functionality to the desktop module, since
various non-Windows systems have supported such things for a while.

Paul

  #7  
Old May 16th, 2006, 06:35 PM
redefined.horizons@gmail.com
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

Thanks for the link Paul. It looks like you've done some good work on
that module.

I'll check it out.

Scott

Paul Boddie wrote:[color=blue]
> bruno at modulix wrote:[color=green]
> > redefined.horizons@gmail.com wrote:
> >[color=darkred]
> > > On a related note, is there a way to fire up Adobe's Acorbat Reader or
> > > and Web Browser from Python and have the external application open a
> > > specified PDF or HTML file? (For example, I want to open the file
> > > "myhelp.pdf" in reader from Python code.)[/color]
> >
> > os.system() may be a good start.[/color]
>
> Take a look at the desktop module for a partial solution:
>
> http://www.python.org/pypi/desktop
>
> An example:
>
> import desktop
> desktop.open("itools-0.9.0.pdf")
>
> Apparently, os.startfile will expose (or already exposes) other
> parameters which may specify that the file be printed, amongst other
> things. I may well add such functionality to the desktop module, since
> various non-Windows systems have supported such things for a while.
>
> Paul[/color]

  #8  
Old May 17th, 2006, 04:55 AM
BartlebyScrivener
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

At the commandline, run:

pydoc -g

In the interpreter:

help("modulename")

or help ()

for interactive.

Are you on Windows? Using ActivePython? Or the Python.org download?

rd

  #9  
Old May 17th, 2006, 01:25 PM
bruno at modulix
Guest
 
Posts: n/a
Default Re: Help System For Python Applications

BartlebyScrivener wrote:[color=blue]
> At the commandline, run:
>
> pydoc -g
>
> In the interpreter:
>
> help("modulename")
>
> or help ()
>
> for interactive.[/color]

This is developper doc. I think the OP's talking about end-user doc.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb@xiludom.gro'.split('@')])"
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.