python/dist/src/Mac/Tools/IDE PythonIDE.plist, 1.2.6.1, 1.2.6.2 PythonIDEMain.py, 1.35.8.1, 1.35.8.2

Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory sc8-pr-cvs1:/tmp/cvs-serv17711 Modified Files: Tag: release23-maint PythonIDE.plist PythonIDEMain.py Log Message: Allow for the documentation to be inside PythonIDE as well as in the Python.app inside the framework (the original location for 2.3). This enables us to install the documentation on Panther too. Index: PythonIDE.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDE.plist,v retrieving revision 1.2.6.1 retrieving revision 1.2.6.2 diff -C2 -d -r1.2.6.1 -r1.2.6.2 *** PythonIDE.plist 29 Sep 2003 15:11:31 -0000 1.2.6.1 --- PythonIDE.plist 1 Nov 2003 23:14:41 -0000 1.2.6.2 *************** *** 36,39 **** --- 36,48 ---- <string>2.3.2</string> + <key>CFBundleHelpBookFolder</key> + <array> + <string>PythonDocumentation</string> + </array> + <key>CFBundleHelpBookName</key> + <string>Python Help</string> + <key>CFBundleHelpTOCFile</key> + <string>index.html</string> + <key>CFBundleIconFile</key> <string>PythonIDE.icns</string> Index: PythonIDEMain.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDEMain.py,v retrieving revision 1.35.8.1 retrieving revision 1.35.8.2 diff -C2 -d -r1.35.8.1 -r1.35.8.2 *** PythonIDEMain.py 1 Nov 2003 22:28:19 -0000 1.35.8.1 --- PythonIDEMain.py 1 Nov 2003 23:14:41 -0000 1.35.8.2 *************** *** 38,42 **** if home: os.chdir(home) - print "We are in", os.getcwd() self.preffilepath = os.path.join("Python", "PythonIDE preferences") Wapplication.Application.__init__(self, 'Pide') --- 38,41 ---- *************** *** 456,464 **** # And as AHRegisterHelpBook wants a bundle (with the right bits in # the plist file) we refer it to Python.app python_app = os.path.join(sys.prefix, 'Resources/Python.app') ! help_source = os.path.join(python_app, 'Contents/Resources/English.lproj/Documentation') ! doc_source = os.path.join(python_app, 'Contents/Resources/English.lproj/PythonDocumentation') ! has_help = os.path.isdir(help_source) ! has_doc = os.path.isdir(doc_source) if has_help or has_doc: try: --- 455,483 ---- # And as AHRegisterHelpBook wants a bundle (with the right bits in # the plist file) we refer it to Python.app + # + # To make matters worse we have to look in two places: first in the IDE + # itself, then in the Python application inside the framework. + has_help = False + has_doc = False + ide_path_components = sys.argv[0].split("/") + if ide_path_components[-3:] == ["Contents", "Resources", "PythonIDE.py"]: + ide_app = "/".join(ide_path_components[:-3]) + help_source = os.path.join(ide_app, 'Contents/Resources/English.lproj/Documentation') + doc_source = os.path.join(ide_app, 'Contents/Resources/English.lproj/PythonDocumentation') + has_help = os.path.isdir(help_source) + has_doc = os.path.isdir(doc_source) + if has_help or has_doc: + try: + from Carbon import AH + AH.AHRegisterHelpBook(ide_app) + except (ImportError, MacOS.Error), arg: + pass # W.Message("Cannot register Python Documentation: %s" % str(arg)) python_app = os.path.join(sys.prefix, 'Resources/Python.app') ! if not has_help: ! help_source = os.path.join(python_app, 'Contents/Resources/English.lproj/Documentation') ! has_help = os.path.isdir(help_source) ! if not has_doc: ! doc_source = os.path.join(python_app, 'Contents/Resources/English.lproj/PythonDocumentation') ! has_doc = os.path.isdir(doc_source) if has_help or has_doc: try:
participants (1)
-
jackjansenï¼ users.sourceforge.net