/[ascend]/trunk/pygtk/help.py
ViewVC logotype

Contents of /trunk/pygtk/help.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1552 - (show annotations) (download) (as text)
Tue Jul 24 08:43:23 2007 UTC (13 years, 3 months ago) by jpye
File MIME type: text/x-python
File size: 852 byte(s)
Fixed detection of web browser on Windows (no need for Win32 python package now).
Removing SUNDIALS_* flags where not needed.
Removing debug output about not having YACC or LEX.
Fixing typelex for case of LEX missing (tested with Windows).
1 import webbrowser
2 import os.path
3 import platform
4 import config
5
6 class Help:
7 def __init__(self,helproot=None,url=None):
8 print "HELPROOT =",config.HELPROOT
9 self.goonline=False
10
11 if url is not None:
12 self.webhelproot = url
13 self.goonline = True
14 else:
15 self.webhelproot = config.WEBHELPROOT
16
17 if helproot==None:
18 self.helproot = os.path.expanduser(config.HELPROOT)
19 else:
20 self.helproot = helproot
21
22 if not os.path.exists(self.helproot):
23 print "LOCAL HELP FILES NOT FOUND, WILL USE ONLINE COPY"
24 self.goonline = True
25
26 def run(self,topic=None):
27 _b = webbrowser.get()
28
29 if self.goonline:
30 _u = self.webhelproot
31 else:
32 _p = os.path.join(self.helproot)
33 _u = "file://"+_p
34
35 print "OPENING WEB PAGE: %s..." % _u
36 _b.open(_u);
37 print "BACK FROM WEB CALL"
38
39 if __name__ == "__main__":
40 _h = Help()
41 _h.run()

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22