From: Jonathan B. <jbr...@ea...> - 2004-02-18 23:26:06
|
On Fri, 2004-02-06 at 13:44, Joe Heafner wrote: > Hi. > Has anyone has any success in successfully invoking Help from inside > IDLE in Python 2.3 (Fink's version, installed on Mac OS X 10.3.2 using > Kelvin Chu's instructions)? Setting the BROWSER environment variable > has no visible effect. Nicholas Riley on the Pythonmac-SIG list noted a > bug in IDLE that mistakenly identifies the 'win' in Darwin as Microsoft > Windows so Python thinks it's running on Windows rather than on Darwin. > Is this the culprit: > > def python_docs(self, event=None): > if sys.platform.count('win') or sys.platform.count('nt'): > os.startfile(self.help_url) > return "break" > else: > webbrowser.open(self.help_url) > return "break" The simplest workaround is to simply remove the test for the presence of Windows, making the function: def python_docs(self, event=None): webbrowser.open(self.help_url) return "break" -Jonathan Brandmeyer |