[Tutor] Re: Compiling Python on MacOSX.

Lance E Sloan lsloan@umich.edu
Tue, 24 Sep 2002 12:03:11 -0400


--On Tuesday, September 24, 2002 0:11 -0700 Danny Yoo 
<dyoo@hkn.eecs.berkeley.edu> wrote:
> On Tue, 24 Sep 2002, Derrick 'dman' Hudson wrote:
>> On Sat, Sep 21, 2002 at 10:30:43AM -0500, montana wrote:
>> | Modules/_tkinter.c: In function `Sleep':
>> | Modules/_tkinter.c:252: warning: implicit declaration of function
>> | `select'
>> | make: *** [Modules/_tkinter.o] Error 1
>>
>> Ooh, ouch.  Does anyone know if OSX lacks a select()?
>
> That just can't be right.  OS X is a BSD Unix: it would be a Cardinal sin
> for it not to have select().  *grin*

It has select(2):

  % man select
  SELECT(2)             System Calls Manual            SELECT(2)

  NAME
       select - synchronous I/O multiplexing
  [...]

I responded to "montana", and I think I cc'ed this list, that I didn't have 
any trouble compiling it on my OS X.2 machine.  I thought that maybe he was 
using the wrong version of Python 2.2 source.  I wondered if he had gotten 
it from CVS rather than the tar file.  CVS may contain a "bleeding edge" 
version.

I had trouble compiling Tcl/Tk, but Tony Lownds forwarded some instructions 
to me about that.  I think "montana" forwarded that to this list a couple 
days ago, too.  I followed those and then Tony's Python build instructions 
and now I have a working Python interpreter with Tkinter on my Mac OS X.2 
machine.

There is a slight problem, though.  Tkinter calls work properly from within 
IDLE.  However, if I start Python from a UNIX commandline, I'm unable to 
manipulate the Tk window.  I emailed Tony about that and he acknowledged 
that problem is becoming a FAQ.  He suggested I use pythonw or name my 
files with .pyw, but the build process didn't produce a pythonw, so I'll 
have to figure out how to do that.

Tony suggested another "bleeding edge" solution, try Python 2.3.  He said 
it has a Mac IDE that's built "automagically".  I haven't had time to try 
it yet.

--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"