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

Discussion in 'Python' started by Mensanator, Jan 4, 2010.

  1. Mensanator

    Mensanator Guest

    ....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.
     
    Mensanator, Jan 4, 2010
    #1
    1. Advertising

  2. * 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
     
    Alf P. Steinbach, Jan 4, 2010
    #2
    1. Advertising

  3. Re: How do you configure IDLE on a Mac, seeing as there's noConfigure Option...

    On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <> 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.
     
    Benjamin Kaplan, Jan 4, 2010
    #3
  4. Mensanator

    Steve Holden Guest

    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/
     
    Steve Holden, Jan 4, 2010
    #4
  5. Mensanator

    Ned Deily Guest

    Re: How do you configure IDLE on a Mac,seeing as there's no Configure Option...

    In article
    <>,
    Benjamin Kaplan <> wrote:

    > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <> 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,
     
    Ned Deily, Jan 4, 2010
    #5
  6. Mensanator

    Mensanator Guest

    Re: How do you configure IDLE on a Mac, seeing as there's noConfigure Option...

    On Jan 4, 10:05 am, Benjamin Kaplan <> wrote:
    > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <> 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?
     
    Mensanator, Jan 5, 2010
    #6
  7. Mensanator

    Mensanator Guest

    Re: How do you configure IDLE on a Mac, seeing as there's noConfigure Option...

    On Jan 4, 2:25 pm, Ned Deily <> wrote:
    > In article
    > <>,
    >  Benjamin Kaplan <> wrote:
    >
    > > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <> 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,
    >  
     
    Mensanator, Jan 5, 2010
    #7
  8. Mensanator

    Mensanator Guest

    Re: How do you configure IDLE on a Mac, seeing as there's noConfigure Option...

    On Jan 4, 10:44 pm, Mensanator <> wrote:
    > On Jan 4, 10:05 am, Benjamin Kaplan <> wrote:
    >
    > > On Sun, Jan 3, 2010 at 8:42 PM, Mensanator <> 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.
     
    Mensanator, Jan 5, 2010
    #8
  9. Mensanator

    Mensanator Guest

    Re: How do you configure IDLE on a Mac, seeing as there's noConfigure Option...

    On Jan 4, 9:17 am, "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.

    >
    > 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
     
    Mensanator, Jan 5, 2010
    #9
  10. Mensanator

    Ned Deily Guest

    Re: How do you configure IDLE on a Mac,seeing as there's no Configure Option...

    In article
    <>,
    Mensanator <> 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,
     
    Ned Deily, Jan 5, 2010
    #10
  11. Mensanator

    Mensanator Guest

    it gets worse (was: How do you configure IDLE on a Mac...)

    On Jan 5, 12:32 am, Ned Deily <> wrote:
    > In article
    > <>,
    >
    >
    >
    >
    >
    >  Mensanator <> 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.


    Good to know. But, as the subject says...

    >
    > 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.


    So, for all practical purposes, the macports install is broken also.

    IDLE simply does not work in an X11 window (you think someone would
    have noticed that). The missing preferences is just the beginning.
    Apparently NONE of the menu item shortcuts work.

    For example, the Cut, Copy, Paste shortcuts are given as Command-X,
    Command-C and Command-V. But that doesn't work in an X11 window,
    apperently only in an Aqua Tk (parent application appears as IDLE).

    Of course, I can do Control-X, Control-C and Control-V to do Cut,
    Copy and Paste. Don't know if this works for all shortcuts, but
    I suppose I could just pick them from the menu (and I can bang
    my head against the wall while I'm at it).

    What do you think, suppose I copy the gmpy built with the macports
    install over to the directory where the python.org version is? Would
    it
    import? If that'll work, I can switch back to using the python.org
    install and use it's version of IDLE. I certainly won't be needing
    distutils once I have a working version of gmpy.

    >
    > --
    >  Ned Deily,
    >  - Hide quoted text -
    >
    > - Show quoted text -
     
    Mensanator, Jan 5, 2010
    #11
  12. Mensanator

    Ned Deily Guest

    Re: it gets worse (was: How do you configure IDLE on a Mac...)

    In article
    <>,
    Mensanator <> wrote:
    [...]
    > So, for all practical purposes, the macports install is broken also.
    >
    > IDLE simply does not work in an X11 window (you think someone would
    > have noticed that). The missing preferences is just the beginning.
    > Apparently NONE of the menu item shortcuts work.
    >
    > For example, the Cut, Copy, Paste shortcuts are given as Command-X,
    > Command-C and Command-V. But that doesn't work in an X11 window,
    > apperently only in an Aqua Tk (parent application appears as IDLE).
    >
    > Of course, I can do Control-X, Control-C and Control-V to do Cut,
    > Copy and Paste. Don't know if this works for all shortcuts, but
    > I suppose I could just pick them from the menu (and I can bang
    > my head against the wall while I'm at it).
    >
    > What do you think, suppose I copy the gmpy built with the macports
    > install over to the directory where the python.org version is? Would
    > it
    > import? If that'll work, I can switch back to using the python.org
    > install and use it's version of IDLE. I certainly won't be needing
    > distutils once I have a working version of gmpy.


    Let's go back to your original problem, which, if I understand
    correctly, was trying to get going with Python 3 and gmpy on OS X 10.6.
    (Sorry I was away over the holidays and didn't get a chance to respond
    to your original postings at the time.) I believe the problems you
    originally encountered with installing gmpy were all due to a couple of
    problems with building C extension modules on 10.6 when using the
    current 3.1.1 OS X python.org. Unfortunately, 3.1.1 was released before
    10.6 was so there are a couple of important fixes that haven't yet been
    released for 3.1 (but are in the 2.6.4 installer which was released
    after 10.6 came out). Fortunately, though, there are simple workarounds
    for the problems. Keep in mind, though, that, at the moment, the
    python.org installers for OS X are 32-bit only; that will change in the
    future but if you do need a 64-bit Python 3 you'll need to stick to
    other solutions like MacPorts for the time being.

    First, make sure the gmp library you've installed has 32-bit support.
    If you installed it using MacPorts, check with the file command:

    $ file /opt/local/lib/libgmp.dylib
    /opt/local/lib/libgmp.dylib: Mach-O universal binary with 2 architectures
    /opt/local/lib/libgmp.dylib (for architecture i386): Mach-O dynamically
    linked shared library i386
    /opt/local/lib/libgmp.dylib (for architecture x86_64): Mach-O 64-bit
    dynamically linked shared library x86_64

    If it doesn't have an i386 variant, reinstall the gmp library from
    MacPorts:

    $ sudo port selfupdate # make sure MacPorts is up-to-date
    $ sudo port clean gmp
    $ sudo port install gmp +universal # install 32-/64-bit variants

    Second, you need to install the MacOSX10.4u SDK because the current
    python.org pythons are built with it. That SDK is included in the Snow
    Leopard Xcode installer package but it is not installed by default.
    There should be an Xcode.mpkg somewhere, perhaps on your hard disk if
    your system came with Snow Leopard factory-installed or perhaps on a
    restore DVD. If not, it's on the retail Snow Leopard DVD and can be
    downloaded from the Apple Developer site. After launching the Xcode
    installer, just select and install the "Mac OS 10.4 Support" package
    from the Custom Install menu.

    Third, you need to tell Distutils to use the older gcc-4.0 instead of
    the gcc-4.2 which is now the default on 10.6.

    $ cd /path/to/gmpy-1.11rc1
    $ export CC=/usr/bin/gcc-4.0
    $ /usr/local/bin/python3.1 setup.py install
    ....
    $ /usr/local/bin/python3.1 test3/gmpy_test.py
    Unit tests for gmpy 1.11
    on Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
    [GCC 4.0.1 (Apple Inc. build 5493)]
    Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
    ....
    1500 tests in 42 items.
    1500 passed and 0 failed.

    --
    Ned Deily,
     
    Ned Deily, Jan 5, 2010
    #12
  13. Mensanator

    Mensanator Guest

    Re: it gets worse (was: How do you configure IDLE on a Mac...)

    On Jan 5, 4:03 pm, Ned Deily <> wrote:
    > In article
    > <>, Mensanator <> wrote:
    >
    > [...]
    >
    >
    >
    >
    >
    > > So, for all practical purposes, the macports install is broken also.

    >
    > > IDLE simply does not work in an X11 window (you think someone would
    > > have noticed that). The missing preferences is just the beginning.
    > > Apparently NONE of the menu item shortcuts work.

    >
    > > For example, the Cut, Copy, Paste shortcuts are given as Command-X,
    > > Command-C and Command-V. But that doesn't work in an X11 window,
    > > apperently only in an Aqua Tk (parent application appears as IDLE).

    >
    > > Of course, I can do Control-X, Control-C and Control-V to do Cut,
    > > Copy and Paste. Don't know if this works for all shortcuts, but
    > > I suppose I could just pick them from the menu (and I can bang
    > > my head against the wall while I'm at it).

    >
    > > What do you think, suppose I copy the gmpy built with the macports
    > > install over to the directory where the python.org version is? Would
    > > it
    > > import? If that'll work, I can switch back to using the python.org
    > > install and use it's version of IDLE. I certainly won't be needing
    > > distutils once I have a working version of gmpy.

    >
    > Let's go back to your original problem, which, if I understand
    > correctly, was trying to get going with Python 3 and gmpy on OS X 10.6.  


    Right.

    > (Sorry I was away over the holidays and didn't get a chance to respond
    > to your original postings at the time.)  


    Hey, no problem. I bought this dingus with the idea I would
    spend my the holiday time to get it to work. Boy, was I right.

    > I believe the problems you
    > originally encountered with installing gmpy were all due to a couple of
    > problems with building C extension modules on 10.6 when using the
    > current 3.1.1 OS X python.org.  


    Yeah, I used the Mac disk image for Python 3.1.

    > Unfortunately, 3.1.1 was released before
    > 10.6 was so there are a couple of important fixes that haven't yet been
    > released for 3.1 (but are in the 2.6.4 installer which was released
    > after 10.6 came out).  Fortunately, though, there are simple workarounds
    > for the problems.  Keep in mind, though, that, at the moment, the
    > python.org installers for OS X are 32-bit only;


    I just checked, I was told to check sys.maxint but that doesn't exist,
    I assume it's now sys.maxsize. On the python.org disk image, that
    returns

    >>> hex(sys.maxsize)

    '0x7fffffff'

    looks like 32 bits.

    > that will change in the
    > future but if you do need a 64-bit Python 3 you'll need to stick to
    > other solutions like MacPorts for the time being.


    The macports install of 3.1 gives:

    >>> hex(sys.maxsize)

    '07x7fffffffffffffff'

    so the macports must be 64 bits.

    >
    > First, make sure the gmp library you've installed has 32-bit support.  


    Uh, why would I want that? If it comes down to a choice between
    IDLE and 64 bits, I'll live without IDLE.

    > If you installed it using MacPorts, check with the file command:
    >
    > $ file /opt/local/lib/libgmp.dylib
    > /opt/local/lib/libgmp.dylib: Mach-O universal binary with 2 architectures
    > /opt/local/lib/libgmp.dylib (for architecture i386):  Mach-O dynamically
    > linked shared library i386
    > /opt/local/lib/libgmp.dylib (for architecture x86_64):   Mach-O 64-bit
    > dynamically linked shared library x86_64


    I get

    /opt/local/lib/libgmpdylib: Mach-0 64-bit dynamically linked shared
    library x86_64

    >
    > If it doesn't have an i386 variant, reinstall the gmp library from
    > MacPorts:


    But I only need that if I want to run the 32 bit version of Python
    from python.org. If I'm willing to use the 64 bit version from
    macports, I don't care, right?

    >
    > $ sudo port selfupdate    # make sure MacPorts is up-to-date
    > $ sudo port clean gmp
    > $ sudo port install gmp +universal     # install 32-/64-bit variants
    >
    > Second, you need to install the MacOSX10.4u SDK because the current
    > python.org pythons are built with it.


    Then I'll just not use the download from python.org. Is there a way
    to uninstall that disk image?

    > That SDK is included in the Snow
    > Leopard Xcode installer package but it is not installed by default.  
    > There should be an Xcode.mpkg somewhere, perhaps on your hard disk if
    > your system came with Snow Leopard factory-installed or perhaps on a
    > restore DVD.  If not, it's on the retail Snow Leopard DVD and can be
    > downloaded from the Apple Developer site.  After launching the Xcode
    > installer, just select and install the "Mac OS 10.4 Support" package
    > from the Custom Install menu.
    >
    > Third, you need to tell Distutils to use the older gcc-4.0 instead of
    > the gcc-4.2 which is now the default on 10.6.
    >
    > $ cd /path/to/gmpy-1.11rc1
    > $ export CC=/usr/bin/gcc-4.0
    > $ /usr/local/bin/python3.1 setup.py install
    > ...
    > $ /usr/local/bin/python3.1 test3/gmpy_test.py
    > Unit tests for gmpy 1.11
    >     on Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
    > [GCC 4.0.1 (Apple Inc. build 5493)]
    > Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
    > ...
    > 1500 tests in 42 items.
    > 1500 passed and 0 failed.


    It would appear that all the above is unnecessary, as I have
    64 bit Python from macports working with the 64 bit version
    of gmpy compiled by macports. Not only does it pass the unit
    test, but since it's 64 bits, I can reach beyond the "outrageous
    exponent error" that I've seen in 32 bit Windows versions. I'm
    told that gmp can't do more than 48 billion decimal digits, so I
    now hit that restriction before I reach the next level of
    "outrageous exponent".

    I just won't be able to properly run IDLE, but as I said, that's
    expendable.

    Anyway, thanks for pointing that out, didn't realize the python.org
    disk image was 32 bits. There was no point in downloading it at all.

    As I pointed out in the thread "the need for 64 bits", once I've
    seen Paris, there's no going back.

    >
    > --
    >  Ned Deily,
    >  
     
    Mensanator, Jan 6, 2010
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HS1
    Replies:
    0
    Views:
    480
  2. Joshua Beall
    Replies:
    4
    Views:
    5,591
    informant
    Oct 30, 2003
  3. Robert P. J. Day
    Replies:
    1
    Views:
    1,334
  4. Dave Thomas
    Replies:
    10
    Views:
    186
    Eero Saynatkari
    Jan 17, 2006
  5. Alex
    Replies:
    12
    Views:
    744
Loading...

Share This Page