Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How do you configure IDLE on a Mac, seeing as there's no ConfigureOption...

Reply
Thread Tools

How do you configure IDLE on a Mac, seeing as there's no ConfigureOption...

 
 
Mensanator
Guest
Posts: n/a
 
      01-04-2010
....because there's no [Options] menu on the shell window?

Or at least give me a clue to how to use Courier New font?

For some inscrutable reason, depite the plethora of formatting tools,
someone decided that proportional spaced fonts ought to be the
default for IDLE.
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      01-04-2010
* Mensanator:
> ...because there's no [Options] menu on the shell window?
>
> Or at least give me a clue to how to use Courier New font?
>
> For some inscrutable reason, depite the plethora of formatting tools,
> someone decided that proportional spaced fonts ought to be the
> default for IDLE.


Why not just use the Python interpreter, a reasonable programmer's editor and,
if you need it, some debugger.

The source code level debugging in IDLE is nothing to write home about.

In Windows XP it is just silly: it marks the current line by ordinary text
selection, which (depending on your config, but I think this is default) is
invisible when you're looking at the debugger window for single stepping. You
can see it by switching back to the source code window but that's annoying, not
very practical. Invisible highlighting of the current line, he he...


Cheers & hth.,

- Alf
 
Reply With Quote
 
 
 
 
Benjamin Kaplan
Guest
Posts: n/a
 
      01-04-2010
On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <(E-Mail Removed)> wrote:
> ...because there's no [Options] menu on the shell window?
>
> Or at least give me a clue to how to use Courier New font?
>
> For some inscrutable reason, depite the plethora of formatting tools,
> someone decided that proportional spaced fonts ought to be the
> default for IDLE.
> --
> http://mail.python.org/mailman/listinfo/python-list
>


Mac Applications don't have "options" menus. They have a "preferences"
pane which is the second item in the application menu (the one that
takes the name of the active program) and has a keyboard shortcut of
Cmd-,

Apple's user-interface guidelines are pretty specific, so you'll find
that this works for all native OS X (i.e. not X11) applications.
 
Reply With Quote
 
Steve Holden
Guest
Posts: n/a
 
      01-04-2010
Alf P. Steinbach wrote:
> * Mensanator:
>> ...because there's no [Options] menu on the shell window?
>>
>> Or at least give me a clue to how to use Courier New font?
>>
>> For some inscrutable reason, depite the plethora of formatting tools,
>> someone decided that proportional spaced fonts ought to be the
>> default for IDLE.


Yeah, that was a smart move, wasn't it?
>
> Why not just use the Python interpreter, a reasonable programmer's
> editor and, if you need it, some debugger.
>
> The source code level debugging in IDLE is nothing to write home about.
>

I quite agree.

> In Windows XP it is just silly: it marks the current line by ordinary
> text selection, which (depending on your config, but I think this is
> default) is invisible when you're looking at the debugger window for
> single stepping. You can see it by switching back to the source code
> window but that's annoying, not very practical. Invisible highlighting
> of the current line, he he...
>

I remember being extremely surprised to read that a Python developer I
greatly admire uses IDLE as his main development interface. Frankly I
have always found IDLE extremely non-intuitive, and I am constantly
frustrated at having to explain about its shortcomings and oddities to
newcomers in my "Introduction to Python" classes.

Who actually maintains IDLE nowadays?

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

 
Reply With Quote
 
Ned Deily
Guest
Posts: n/a
 
      01-04-2010
In article
<ec96e1391001040805j13b4e5cet3f1b74e9a81ed5c5@mail .gmail.com>,
Benjamin Kaplan <(E-Mail Removed)> wrote:

> On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <(E-Mail Removed)> wrote:
> > ...because there's no [Options] menu on the shell window?
> >
> > Or at least give me a clue to how to use Courier New font?
> >
> > For some inscrutable reason, depite the plethora of formatting tools,
> > someone decided that proportional spaced fonts ought to be the
> > default for IDLE.

> Mac Applications don't have "options" menus. They have a "preferences"
> pane which is the second item in the application menu (the one that
> takes the name of the active program) and has a keyboard shortcut of
> Cmd-,
>
> Apple's user-interface guidelines are pretty specific, so you'll find
> that this works for all native OS X (i.e. not X11) applications.


But be aware that IDLE on OS X has had various problems with missing
and/or duplicate menu items. IIRC, the current python.org OS X IDLEs
(2.6.4 and 3.1.1) should be OK and you can modify the font via the
Preferences menu (and currently changed preferences apply to all
versions of IDLE). Note also that there are two different ways to
launch the OS X IDLE. python.org installers put a double-clickable
IDLE.app in /Applications/Python n.x. There is also a command-line
"idlen.n" in /Library/Frameworks/Python.framework/Versions/n.n/bin
which, optionally, has a symlink from /usr/local/bin.

--
Ned Deily,
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
Mensanator
Guest
Posts: n/a
 
      01-05-2010
On Jan 4, 10:05*am, Benjamin Kaplan <(E-Mail Removed)> wrote:
> On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <(E-Mail Removed)> wrote:
> > ...because there's no [Options] menu on the shell window?

>
> > Or at least give me a clue to how to use Courier New font?

>
> > For some inscrutable reason, depite the plethora of formatting tools,
> > someone decided that proportional spaced fonts ought to be the
> > default for IDLE.
> > --
> >http://mail.python.org/mailman/listinfo/python-list

>
> Mac Applications don't have "options" menus. They have a "preferences"
> pane which is the second item in the application menu


Sometimes it's the second item, sometimes it's not

> (the one that
> takes the name of the active program) and has a keyboard shortcut of
> Cmd-,
>
> Apple's user-interface guidelines are pretty specific, so you'll find
> that this works for all native OS X (i.e. not X11) applications.


Right, it doesn't apply to IDLE which uses X11 (there is a preferences
window,
but it doesn't have any font control, unlike stuff like Safari).

I assume there must be a configuration file. Any idea what that file
is called?
 
Reply With Quote
 
Mensanator
Guest
Posts: n/a
 
      01-05-2010
On Jan 4, 2:25*pm, Ned Deily <(E-Mail Removed)> wrote:
> In article
> <ec96e1391001040805j13b4e5cet3f1b74e9a81ed...@mail .gmail.com>,
> *Benjamin Kaplan <(E-Mail Removed)> wrote:
>
> > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <(E-Mail Removed)> wrote:
> > > ...because there's no [Options] menu on the shell window?

>
> > > Or at least give me a clue to how to use Courier New font?

>
> > > For some inscrutable reason, depite the plethora of formatting tools,
> > > someone decided that proportional spaced fonts ought to be the
> > > default for IDLE.

> > Mac Applications don't have "options" menus. They have a "preferences"
> > pane which is the second item in the application menu (the one that
> > takes the name of the active program) and has a keyboard shortcut of
> > Cmd-,

>
> > Apple's user-interface guidelines are pretty specific, so you'll find
> > that this works for all native OS X (i.e. not X11) applications.

>
> But be aware that IDLE on OS X has had various problems with missing
> and/or duplicate menu items. *IIRC, the current python.org OS X IDLEs
> (2.6.4 and 3.1.1) should be OK and you can modify the font via the
> Preferences menu


No, I already checked. Both system preferences and X11 preferences.

> (and currently changed preferences apply to all
> versions of IDLE). *Note also that there are two different ways to
> launch the OS X IDLE. *python.org installers put a double-clickable
> IDLE.app in /Applications/Python n.x.


Yeah, I've still got that one installed, but it has the broken
distutils
from python.org.


>*There is also a command-line
> "idlen.n" in /Library/Frameworks/Python.framework/Versions/n.n/bin
> which, optionally, has a symlink from /usr/local/bin.


AARRGGHH!!! I'm pulling my hair out!

I haven't been using the IDLE from the broken python.org disk image.

I assume I've been using the IDLE from macports. From the command
prompt I've
been typing "idle". This launches a "shell" window which appears to
have an X11
parent application for which there are no "preferences" applicable to
fonts.

However, if I use the quick launcher from the python.org, I get a
"shell" whose
parent is named "IDLE"! And that one has a completely different
preferences,
one similar the the Windows Configure which allows me to set the font!

Now, if I close this shell and start IDLE from the command line again,
I still
get a "shell" with an X11 parent, but, lo and behold, the font has
changed to
what I had previously set with the IDLE parent.

Course, I can't import gmpy, cause the python.org version can't
compile it, so I
still have to use the macports install of 3.1, but that's ok, once I
use
the IDLE application to set the preferences, I can switch back to the
X11 version and the preferences will follow.

Wow!

That was fun. Thanks for the help everyone. Don't ask me to explain
what I just
did, sometimes you just have to let art flow over you.

>
> --
> *Ned Deily,
> *(E-Mail Removed)


 
Reply With Quote
 
Mensanator
Guest
Posts: n/a
 
      01-05-2010
On Jan 4, 10:44*pm, Mensanator <(E-Mail Removed)> wrote:
> On Jan 4, 10:05*am, Benjamin Kaplan <(E-Mail Removed)> wrote:
>
> > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <(E-Mail Removed)> wrote:
> > > ...because there's no [Options] menu on the shell window?

>
> > > Or at least give me a clue to how to use Courier New font?

>
> > > For some inscrutable reason, depite the plethora of formatting tools,
> > > someone decided that proportional spaced fonts ought to be the
> > > default for IDLE.
> > > --
> > >http://mail.python.org/mailman/listinfo/python-list

>
> > Mac Applications don't have "options" menus. They have a "preferences"
> > pane which is the second item in the application menu

>
> Sometimes it's the second item, sometimes it's not
>
> > (the one that
> > takes the name of the active program) and has a keyboard shortcut of
> > Cmd-,

>
> > Apple's user-interface guidelines are pretty specific, so you'll find
> > that this works for all native OS X (i.e. not X11) applications.

>
> Right, it doesn't apply to IDLE which uses X11


Depending on how you launch it.

If I type "idle" at a command prompt, I get a shell window whose
parent
is X11. Here you will get X11 preferences which can't be used to
change fonts.

If I click the IDLE icon, then I get a shell whose parent is IDLE, not
X11 and
here you'll find a preferences window similar to the OPTIONS/Configure
in Windows.

> (there is a preferences
> window,
> but it doesn't have any font control, unlike stuff like Safari).
>
> I assume there must be a configuration file. Any idea what that file
> is called?


I still don't know but apparently as long as I use the IDLE
application
instead of X11, I can set the font.

Thanks for your time.

 
Reply With Quote
 
Mensanator
Guest
Posts: n/a
 
      01-05-2010
On Jan 4, 9:17*am, "Alf P. Steinbach" <(E-Mail Removed)> wrote:
> * Mensanator:
>
> > ...because there's no [Options] menu on the shell window?

>
> > Or at least give me a clue to how to use Courier New font?

>
> > For some inscrutable reason, depite the plethora of formatting tools,
> > someone decided that proportional spaced fonts ought to be the
> > default for IDLE.

>
> Why not just use the Python interpreter, a reasonable programmer's editor and,
> if you need it, some debugger.


I think I've solved my problem.

I'll just say here that at least IDLE is cross-platform AND is part of
the
"batteries included". I'll be using it on both my new Mac and my
desktop
PCs running Windows.

>
> The source code level debugging in IDLE is nothing to write home about.


I've got 20 years worth of programs and web pages written with
Notepad,
so don't let me hear any dissing of IDLE, ok?

>
> In Windows XP it is just silly: it marks the current line by ordinary text
> selection, which (depending on your config, but I think this is default) is
> invisible when you're looking at the debugger window for single stepping. You
> can see it by switching back to the source code window but that's annoying, not
> very practical. Invisible highlighting of the current line, he he...
>
> Cheers & hth.,
>
> - Alf


 
Reply With Quote
 
Ned Deily
Guest
Posts: n/a
 
      01-05-2010
In article
<(E-Mail Removed)>,
Mensanator <(E-Mail Removed)> wrote:
> I assume I've been using the IDLE from macports. From the command
> prompt I've
> been typing "idle". This launches a "shell" window which appears to
> have an X11
> parent application for which there are no "preferences" applicable to
> fonts.
>
> However, if I use the quick launcher from the python.org, I get a
> "shell" whose
> parent is named "IDLE"! And that one has a completely different
> preferences,
> one similar the the Windows Configure which allows me to set the font!
>
> Now, if I close this shell and start IDLE from the command line again,
> I still
> get a "shell" with an X11 parent, but, lo and behold, the font has
> changed to
> what I had previously set with the IDLE parent.
>
> Course, I can't import gmpy, cause the python.org version can't
> compile it, so I
> still have to use the macports install of 3.1, but that's ok, once I
> use
> the IDLE application to set the preferences, I can switch back to the
> X11 version and the preferences will follow.


The prefs follow because all versions of IDLE use the same (unversioned)
directory for configuration files, ~/.idlerc/. In particular, the
configuration file ~/.idlerc/config-main.cfg contains, among other
things, any changes to the default font. So, if you're successful at
changing it in one version of IDLE, it will likely affect all versions
you have. Note the file is a simple ini format:

[EditorWindow]
font = monaco

so you can edit it by hand.

BTW, the python.org IDLEs and the Apple-supplied IDLEs use the
system-supplied Aqua (aka Quartz) Tk not the X11 one that MacPorts
builds by default. The MacPorts Tk port does have a "quartz" variant
but that doesn't yet work in 64-bit mode.

--
Ned Deily,
(E-Mail Removed)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Is there a way to configure IDLE to use spaces instead of tabs for indenting? Alex Python 12 10-17-2012 03:34 PM
can i configure IDLE to use python 3.2 on fedora? Robert P. J. Day Python 1 11-10-2009 10:02 PM
configure idle timout for Cisco vpnclient for linux 4.6.0 aasim.ss@gmail.com Cisco 1 06-23-2005 05:42 AM



Advertisments