Infrastructural Resolutions and Trouble-shooting Anecdotes

The following are some of the practical problems I have encountered and resolved (at least to my own satisfaction) while programming with Python.

OS X:

Mavericks Tcl/Tk issue

On OS X 10.9 Mavericks, there is a problem with Aqua Cocoa Tk 8.5 (8.5.15 or earlier) when run in 64-bit mode, the default for most applications. The symptoms are that Tk widgets may not be properly drawn or updated on the screen unless some HID activity takes place, like mousing over the widget or by entering text via the keyboard. issue 19373

After upgrading to Mavericks, I experienced the described issue, even though I already had Tk 8.5.15.1. I reinstalled Tk 8.5.15.1, which fixed the draw/update issue but resulted in method hangs when tkinter.messagebox elements were called. (Got the same problem when calling them from/via Idle.) A fresh reinstall of Python seemed to correct that problem as well.

Code execution

So, I expected that dropping a module on Python Launcher.app should initialize and execute the module. It doesn't. While I suspect I have a configuration error somewhere or am missing the obvious, I decided to invoke the Terminal.app and call my Python programs from that. The advantage to this, since I like to have most of my classes and functions available from a gui, is that it provides a stout print location without any extra work.

cx_Freeze

cx_Freeze was throwing an installation error that it could not find gcc-4.2. (My current version is i686-apple-darwin11-llvm-gcc-4.2) After much frustration, searching, replacing my version of Xcode - and losing my entire Development folder in the process - it still didn't work. I then, thinking it couldn't be this easy, created a soft-link to i686-apple-darwin11-llvm-gcc-4.2 named gcc-4.2 ... worked like a charm. o.O.

Open Script Architecture

I initially utilized Appscript to accomplish some of the OS X specific scripting activity that was a layer or two abstracted from Python. For legitimate reasons of their own, the programmers have depreciated this software. Consequently, I now utilize osascript for this type of activity. (See osa.py in the OSX package of the arcane_rhino package.)