[Idle-dev] IDLE and Mac OS X

Tony Lownds tony@lownds.com
Fri, 13 Sep 2002 08:28:10 -0700


At 12:30 AM -0400 9/13/02, Kurt B. Kaiser wrote:
>Tony Lownds <tony@lownds.com> writes:
>
>>  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.
>
>If you look at CVS you'll see that I probably chopped more out of the
>"idle" script a year or so ago than I should have.  Also take a look
>at the INSTALL.txt file which has details regarding the idlelib
>package.
>
>We've been doing quick turn-arounds by executing "python idle.py" in
>the idlefork directory and not paying much attention to proper
>installation yet.  I'll take another look.

I'm happy to use the script I posted while developing.

FYI "python idle.py" won't pull up a GUI on OSX (I'm planning on 
looking at the remote execution code to seeifthat will cause problems 
soon)

>  > Furthermore, if I tweak the startup scripts to use a package I get a
>>  exception
>
>[...]
>
>>  ImportError: No module named loader
>
>Try a fresh checkout of DS_RPC_BRANCH.  loader.py and Remote.py have
>been restored recently.

I did have those. I thought the exception was happening because 
imp.find_module, and the fact that I was loading PyShell from a 
package, were interacting badly. Running some simple tests on imp 
aren't bearing out my hypothesis, yet I still get the error if I 
start idle like this:

from idlelib import PyShell
PyShell.main()

...like it is done in Python's cvs.

>It will install using its setup.py as .../PythonX.X/sitepackages/Idle
>

So Idle will be accessed as a package on the path.

When you run idle using "python idle.py" you have the idle directory 
on the path directly, not as a package on the path. Since idle will 
install as a package on a path, would you try running it as such to 
see if you get the same error (ImportError: No module named "loader") 
... I just want to make sure my platform isn't crazy...

i.e.

cd ..
python -c "from idle import PyShell; PyShell.main()"


-Tony