[Idle-dev] IDLE and Mac OS X

Tony Lownds tony@lownds.com
Thu, 12 Sep 2002 13:15:28 -0700


--============_-1180260764==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

One thing I've already noticed: I was using Tools/idle/idle as the 
bootstrap script. That script imports a package named "idlelib", and 
that fits the OSX applet model quite well.

In idlefork, none of the startup scripts seem to use a separate 
package. Furthermore, if I tweak the startup scripts to use a package 
I get a exception

#! /usr/bin/env python

from idlelib import PyShell
PyShell.main()


Failed to load extension 'ExecBinding'
Traceback (most recent call last):
   File 
"/Applications/Python/IDLE.app/Contents/Resources/idlelib/EditorWindow.py", 
line 691, in load_standard_extensions
     self.load_extension(name)
   File 
"/Applications/Python/IDLE.app/Contents/Resources/idlelib/EditorWindow.py", 
line 701, in load_extension
     mod = __import__(name, globals(), locals(), [])
   File 
"/Applications/Python/IDLE.app/Contents/Resources/idlelib/ExecBinding.py", 
line 30, in ?
     load_py  = spawn.hardpath( imp.find_module("loader")[1] )
ImportError: No module named loader

Right now I'm using a startup script like:

#! /usr/bin/env python

# add "idlelib", a sibling of the file, to the path
import sys, os
sys.path.append(os.path.join(os.path.split(__file__)[0], 'idlelib'))

import PyShell
PyShell.main()

What will IDLE 0.9 do?


Thanks,
-Tony
--============_-1180260764==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [Idle-dev] IDLE and Mac OS
X</title></head><body>
<div>One thing I've already noticed: I was using Tools/idle/idle as
the bootstrap script. That script imports a package named
&quot;idlelib&quot;, and that fits the OSX applet model quite
well.</div>
<div><br></div>
<div>In idlefork, none of the startup scripts seem to use a separate
package. Furthermore, if I tweak the startup scripts to use a package
I get a exception</div>
<div><br></div>
<div>#! /usr/bin/env python<br>
<br>
from idlelib import PyShell<br>
PyShell.main()<br>
</div>
<div><br></div>
<div><tt><font size="+1" color="#000000">Failed to load extension
'ExecBinding'<br>
Traceback (most recent call last):<br>
&nbsp; File
&quot;/Applications/Python/IDLE.app/Contents/Resources/idlelib/Editor<span
></span>Window.py&quot;, line 691, in load_standard_extensions<br>
&nbsp;&nbsp;&nbsp; self.load_extension(name)<br>
&nbsp; File
&quot;/Applications/Python/IDLE.app/Contents/Resources/idlelib/Editor<span
></span>Window.py&quot;, line 701, in load_extension<br>
&nbsp;&nbsp;&nbsp; mod = __import__(name, globals(), locals(), [])<br>
&nbsp; File
&quot;/Applications/Python/IDLE.app/Contents/Resources/idlelib/ExecBi<span
></span>nding.py&quot;, line 30, in ?<br>
&nbsp;&nbsp;&nbsp; load_py&nbsp; = spawn.hardpath(
imp.find_module(&quot;loader&quot;)[1] )</font></tt></div>
<div><tt><font size="+1" color="#000000">ImportError: No module named
loader</font></tt></div>
<div><br></div>
<div>Right now I'm using a startup script like:</div>
<div><br></div>
<div>#! /usr/bin/env python<br>
<br>
# add &quot;idlelib&quot;, a sibling of the file, to the path<br>
import sys, os<br>
sys.path.append(os.path.join(os.path.split(__file__)[0],
'idlelib'))<br>
<br>
import PyShell</div>
<div>PyShell.main()</div>
<div><br></div>
<div>What will IDLE 0.9 do?</div>
<div><br></div>
<div><br></div>
<div>Thanks,</div>
<div>-Tony</div>
</body>
</html>
--============_-1180260764==_ma============--