Darwin + Tkinter + Aqua-Tk? (Re: Macintosh Development)

Brian Lenihan brian_l at yahoo.com
Thu Apr 18 03:19:37 EDT 2002


tony-clpy at lownds.com (Tony Lownds) wrote in message news:<ad053a43.0204171823.54f54b99 at posting.google.com>...
> > Tony Lownds has instructions here:
> > http://mail.python.org/pipermail/pythonmac-sig/2002-April/005420.html
> > 
> 
> Here too: http://tony.lownds.com/macosx/tkinter.html
> 
> Someday Tkinter and IDLE will work nicely OOTB on OSX!
> 
> > AquaTk seems to have some problems with path separators (try file open
> > in IDLE for an example).
> 
> 
> AquaTk's File open/save doesn't handle unix paths well. Since python
> on Darwin (a.k.a. MachoPython) uses unix paths natively, IDLE's Open
> and Save methods don't work. I believe this is posted as a bug in Tk's
> Tracker, but it could be fixed in Python code too.

Yes, we ran into the same problem while porting our build system to OS
X.  To make the transition easier, the build system needs to be able
to run on both Mach-o and Carbon Python depending on the context.

We wanted to avoid changing the Applescripts which create and run
Codewarrior projects because we think we will be able to avoid
Applescript completely in the near future, assuming there is a version
of CW which can do Carbon builds from the command line.

The easiest solution was write some functions which always create a
correct path for the given environment, even when the input contains
both Unix and Mac path seps.

We generally try to avoid overriding things like os.path.join to avoid
any chance things breakng if we upgrade Python.  os.path.join is not a
very good example as I doubt it is going to move to a different module
or disappear anytime soon.  A better example is some of the constants
in the fcntl module which went away in 2.2 because they are already
defined in the os module.



More information about the Python-list mailing list