On Feb 9, 2010, at 7:40 PM, Alex Ross wrote:
On Jan 13, 2010, at 11:32 AM, Tony S Yu wrote:
import matplotlib.pyplot as plt plt.plot([0,1])
If I remove the interactive input dylib and add a call to “plt.show()”, this script works. Actually, this script doesn't even work from Terminal unless I'm in interactive mode with python. This is because “plot” is non-blocking, it just draws the plot in the window, and returns. Python then exits, and the window disappears. The “show” *is* blocking, so python remains running until you close the window. In interactive python you don't need the call to show, because python is going to block waiting for user input anyway.
As for why the dylib breaks matplotlib, I'm not exactly sure yet. Looking into it…
Actually, on my system, I have issues before even calling plt.show(). The example above (w/o plt.show) should quit without showing any sort of plot, but on my system, python/textmate just hangs. The hanging happens regardless of whether or not I call plt.show.
Since both you and Mark (see previous reply) can get around this issue by removing dylib but I can't, either there are two different issues or I have tm_interactive_input.dylib in some as-yet-undiscovered location. So far I've removed the dylib from:
~/Library/Application\ Support/TextMate/Support/lib/ /Applications/TextMate.app/Contents/SharedSupport/Support/lib/
Is this file copied or cached anywhere else? (I've already searched with Finder and the locate command.)
-Tony
—Alex
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate