<?xml version="1.0"?><!-- RSS generated by Radio UserLand v8.1 on Fri, 08 Apr 2005 16:43:04 GMT --><rss version="2.0">	<channel>		<title>Feeding The Snake</title>		<link>http://www.pycs.net/users/0000476/</link>		<description>Thoughts on Python, Science, Culture, and Life</description>		<language>en</language>		<copyright>Copyright 2005 Rick Muller</copyright>		<lastBuildDate>Fri, 08 Apr 2005 16:43:04 GMT</lastBuildDate>		<docs>http://backend.userland.com/rss</docs>		<generator>Radio UserLand v8.1</generator>		<managingEditor>rick_muller@yahoo.com</managingEditor>		<webMaster>rick_muller@yahoo.com</webMaster>		<category domain="http://www.weblogs.com/rssUpdates/changes.xml">rssUpdates</category> 		<skipHours>			<hour>23</hour>			<hour>0</hour>			<hour>1</hour>			<hour>2</hour>			<hour>3</hour>			<hour>4</hour>			<hour>6</hour>			<hour>7</hour>			</skipHours>		<cloud domain="update.pycs.net" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>		<ttl>60</ttl>		<item>			<title>The Snake is Hibernating</title>			<description>Writing a blog was fun, but I found that it was taking me away from other fun things that I enjoyed, so FTS is hibernating for now. Thanks to everyone who tuned in.Rick</description>			<guid>http://www.pycs.net/users/0000476/2005/04/08.html#a14</guid>			<pubDate>Fri, 08 Apr 2005 16:39:20 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=14&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F04%2F08.html%23a14</comments>			</item>		<item>			<title>Functional Programming in Python</title>			<description>&lt;p&gt;&lt;a href=&quot;http://www-106.ibm.com/developerworks/linux/library/l-prog.html&quot;&gt;Functional programming&lt;/a&gt; is normally associated with the functions lambda, map, and filter, all functions that &lt;a href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=98196&quot;&gt;Guido says will be going&lt;/a&gt; in &lt;a href=&quot;http://www.python.org/peps/pep-3000.html&quot;&gt;Python 3000&lt;/a&gt;. But in many ways Python functional programming is stronger than ever before.&lt;/p&gt;&lt;p&gt;I started programming in f77, where functions (subroutines) often run thousands of lines. When programming in modern languages I&apos;ve learned to keep my program units down to perhaps 10-20 lines of code. The metric I&apos;ve often used is what will fit on a single screen or a single (ack!) PowerPoint slide.&lt;/p&gt;&lt;p&gt;Almost as a game, I tried to see how much of my programs I could write as single line functions. The results have been striking in my code. My code is now much easier to understand and much easier to refactor in different ways.&lt;/p&gt;&lt;p&gt;A big part of the reason that I think that Python functional programming is still strong is what list comprehensions offer a way to express functional programming concepts in terse but still readable form.&lt;/p&gt;&lt;p&gt;I find that I&apos;m writing more functions, but using each one more times, and by choosing the names appropriately, I can have the code comment itself.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://gnosis.cx/publish/programming/charming_python_b5.txt&quot;&gt;Generators&lt;/a&gt;also allow terse program units to be compiled, although it&apos;s arguable whether they meet the same standard of readability set by list comprehensions. Maybe I simply haven&apos;t seen/written enough of them.&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/31.html#a13</guid>			<pubDate>Fri, 01 Apr 2005 02:25:38 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=13&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F31.html%23a13</comments>			</item>		<item>			<title>Recent Music Acquisitions</title>			<description>Bought some really great albums from &lt;a href=&quot;http://emusic.com&quot;&gt;Emusic&lt;/a&gt; over the last few weeks. Emusic is doing a really good job hunting down new indie albums to add to their site, and I find I&apos;m not getting bored with their selection. &lt;p&gt;Bought two from&lt;a href=&quot;http://www.antonyandthejohnsons.com/&quot;&gt;Antony and the Johnsons&lt;/a&gt;, the Self-Titled album, and &quot;I am a bird now&quot;. Both are haunting and beautiful. The music is described as &quot;genderqueer&quot;, but I&apos;m a straight, married, boringmiddle-aged-white-guy, and I find that there&apos;s a great deal that I empathize with in Antony&apos;s music. Everyone has insecurities, but people who grow up with gender confusion have to confront those in a very direct way. Antony has learned to voice his hopes and fears very clearly and in a way that appeals to everyone.&lt;p&gt;Bought &quot;Rejoicing in the Hands&quot; by &lt;a href=&quot;http://www.younggodrecords.com/prodtype.asp?PT_ID=71&quot;&gt;Devendra Banhart&lt;/a&gt;, who has a lot of vocal similarities toAntony, above. My interest in folk music has waned, but Banhart is much more melodic than most folk music, and his songs, particularly &quot;The Body Breaks&quot;, which is availableas a free download, are striking.&lt;p&gt;Why &lt;a href=&quot;http://www.cordalene.com/main.htm&quot;&gt;Cordalene&lt;/a&gt;isn&apos;t famous, or at least heard of, completely escapes me. Justbought &quot;The Red EP&quot; by them. &quot;Isn&apos;t the Sun&quot;, which is available onthe net as a free download, is just the best song I&apos;ve heard ina long time, and certainly has the best bass line of any song I&apos;ve ever heard. The band plays the type of garage/punk/pop that I&apos;d love to hear more of, and I would be delighted if they got enough of a contract to put together a real album. The fact that they have a new web site is a good sign, so fingers crossed.&lt;p&gt;When the hell is &lt;a href=&quot;http://sayhitoyourmom.com&quot;&gt;Say Hi To Your Mom&lt;/a&gt;going to put out a new album??</description>			<guid>http://www.pycs.net/users/0000476/2005/03/31.html#a12</guid>			<pubDate>Thu, 31 Mar 2005 12:16:59 GMT</pubDate>			<category>Music</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=12&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F31.html%23a12</comments>			</item>		<item>			<title>What does your spam say about you?</title>			<description>Am I the only one who&apos;s fascinated by spam? I&apos;m not so stupid to actually click on any links in a message, and I certainly wouldn&apos;t ever buy anything from one of the ads. However, I started looking through my spam folders a few weeks ago amid fears that legitimate messages were getting filed there, and I&apos;ve continued reading the subjects long since those fears have faded. I guess I feel that spam holds the secret to either our society&apos;s id or my own secrets, but I can never decide which.&lt;p&gt;I like the way that spam adapts to current trends so quickly. They jumped on Ebay and PayPal right away, with messages pretending to tell me that I need to log into my account. It&apos;s slimy, but I respect the fact that the spammers are so current. And, hey, maybe they&apos;re trying to tell me something when they send me all those ads about losing weight and taking viagra.</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a11</guid>			<pubDate>Tue, 29 Mar 2005 22:35:20 GMT</pubDate>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=11&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a11</comments>			</item>		<item>			<title>GMPY (Finally, a new FTS Post)</title>			<description>My apologies for all of the old posts showing up in FTS. I changed to RadioUserland from bzero in a somewhat bumpy transition.&lt;p&gt;I really like the &lt;a href=&quot;http://gmpy.sf.net&quot;&gt;GMPY module&lt;/a&gt;, which consistsof a set of python bindings for the &lt;a href=&quot;http://www.swox.com/gmp/&quot;&gt;Gnu Multiprecision  Library&lt;/a&gt;.Maybe it&apos;s just a sign that my life is boring, but I really enjoyplaying around with arbitrary precision math, and computing longrepresentations of e and pi. In any case, to help evangelize thecause, I put together the following guide&lt;a href=&quot;http://www.pycs.net/users/0000476/stories/2005/03/29/gettingStartedAndHavingFun.html&quot;&gt;Getting Started and Having Fun with GMPY&lt;/a&gt;. This will ultimately become part of the GMPY documentation, but, in the meantime, I wouldwelcome any feedback.</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a10</guid>			<pubDate>Tue, 29 Mar 2005 21:36:55 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=10&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a10</comments>			</item>		<item>			<title>Tagging versus Sorting</title>			<description>&lt;span style=&quot;font-style: italic;&quot;&gt;Note: this is an archive of a postfrom the old bzero version of Feeding the Snake that I wanted toinclude with the new Radiouserland incarnation of the blog.&lt;br&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;I&apos;ve been playing around with &lt;a href=&quot;http://del.icio.us&quot;&gt;del.icio.us&lt;/a&gt;for a couple of days now. I had commented several times to myself thatI didn&apos;t really get the site, and then, in the course of one day, Ispent hours inserting bookmarks and tagging them in various ways. Itwas fun and theraputic in an odd way.&lt;p&gt;I realize that everyone andtheir brother has already blogged about tagging vs sorting. The basicline is that traditionally we&apos;ve sorted items into bins, but sortingitself can be limited. If in my closet I have a drawer for socks, andanother drawer for athletic gear, where do I put my athletic socks? &lt;/p&gt;&lt;p&gt;That&apos;sa silly example, but a real problem I have is with sorting scientificpapers, of which I have thousands. When I used to put these in filecabinets I had a wierd scheme where, if I had more than a few papers byan author I would putthem in a folder under that author&apos;s name, andotherwise I would put them in a folder under the subject name. Not agreat idea, but one that has kinda&apos; worked for a few years.&lt;/p&gt;&lt;p&gt;Nowthat I&apos;m slowly moving into the century of the fruitbat, I&apos;mtrying toupdate my system a bit more. Almost all of my papers are in PDF fileson my laptop hard drive. The above author/subject folder sort haspersisted, but with soft-links I can now put links in the subjectfolders to the files that are in author folders. However, thesystem isbrittle, since I frequently just drop a file into anauthor&apos;s directory,and then forget to put the paper in all of thesubject files that itwould belong in. Or, I create a new subject andforget to track down allof the files in various author folders thatit would correspond to.&lt;/p&gt;&lt;p&gt;A system like the del.icio.us tagging would work ideally. I&apos;ve noticeda proliferation of collection managers like &lt;a href=&quot;http://www.periapsis.org/tellico/&quot;&gt;tellico&lt;/a&gt;for cataloging books, CDs, etc. It would be nice to use/build aPDF-specific collection manager, that could optionally abstractinformation fromthe PDF file itself. If anyone knows of anything alongthese lines, please leave a comment.&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a9</guid>			<pubDate>Tue, 29 Mar 2005 15:44:07 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=9&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a9</comments>			</item>		<item>			<title>Mathematica Style Notebook in Python</title>			<description>&lt;span style=&quot;font-style: italic;&quot;&gt;Note: this is an archive of an oldpost from the bzero version of Feeding the Snake that I wanted toinclude with the current RadioUserland incarnation&lt;/span&gt;&lt;br&gt;&lt;br&gt;Now that &lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;matplotlib&lt;/a&gt; has solvedmy plotting issues for the while, I can turn my attention to the Python shell...&lt;p&gt;My favorite &lt;a href=&quot;http://www.wolfram.com&quot;&gt;Mathematica&lt;/a&gt;feature is the notebook. For those who haven&apos;t used it, the notebook isan interactive shell, but allows plotting to be inlined and saved withthe shell session. This feature makes it really nice for data analysis,since you can save the steps that generated the graphics with thegraphics themselves.&lt;/p&gt;&lt;p&gt;I would love something like this in Python. So would a lot of people.The topic pops up particularly often on the &lt;a href=&quot;http://ipython.scipy.org/&quot;&gt;IPython&lt;/a&gt; mailing lists. &lt;/p&gt;&lt;p&gt;The closest I&apos;ve seen to this is the &lt;a href=&quot;http://dkbza.org/11.0.html&quot;&gt;Python plugin&lt;/a&gt; to the &lt;a href=&quot;http://www.texmacs.org&quot;&gt;TeXmacs&lt;/a&gt; package. I&apos;ve written some extensions to the package to allow it to inline other types of graphics (I was using &lt;a href=&quot;http://biggles.sf.net&quot;&gt;biggles&lt;/a&gt; at the time) and to do so more automatically. It all worked OK, but it wasn&apos;t really what I&apos;m looking for.&lt;/p&gt;&lt;p&gt;I&apos;vestarted thinking about how to implement what I *am* looking for. Itwould have to be something along the lines of a Python shell running ina &lt;a href=&quot;http://wxpython.org&quot;&gt;wxpython&lt;/a&gt; window. Wouldbe nice to be able to use &lt;a href=&quot;http://ipython.scipy.org&quot;&gt;IPython&lt;/a&gt; optionally as the shell, although I&apos;m not such an IPython bigot that I feel I would have to require this.&lt;/p&gt;&lt;p&gt;Python actually makes it pretty easy to write your own shell; I posted my little solution of this&lt;a href=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355319&quot;&gt;in a PyCookbook recipe&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;Matplotlib&lt;/a&gt;has already done alarge part of the requisite work in the way they havebuilt theirpylab library. One would just have to inline the imagesafter theywere computed. Doesn&apos;t sound hard, but, then again, I haven&apos;tdone ityet.&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a7</guid>			<pubDate>Tue, 29 Mar 2005 15:39:11 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=7&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a7</comments>			</item>		<item>			<title>Python Plotting and Matplotlib</title>			<description>&lt;span style=&quot;font-style: italic;&quot;&gt;Note: this is an archive of an old post from the bzero version of Feeding the Snake that I &lt;br&gt;wanted to include with the new RadioUserland version of the blog.&lt;br&gt;&lt;br&gt;&lt;/span&gt;There seem to be almost too many options for python plotting now. Here are the ones that I know about:&lt;ul&gt;  &lt;li&gt;&lt;a href=&quot;http://gnuplot-py.sourceforge.net/&quot;&gt;Gnuplot-py&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href=&quot;http://biggles.sf.net&quot;&gt;Biggles&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href=&quot;http://pyx.sourceforge.net/&quot;&gt;PyX&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href=&quot;http://scipy.org&quot;&gt;SciPy modules plt and gplt&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;Matplotlib&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;I&apos;m a scientist, and so being able to display my data is a big dealto me, which means that I &lt;i&gt;try&lt;/i&gt;to stay on top of all of this,but I&apos;m having a harder and harder time.I normally try to predictwhich package has the largest mindshare, andgo with that one, sinceI figure that package will be easiest for mycollaborators to use.&lt;p&gt;The first module I used was the &lt;a href=&quot;http://gnuplot-py.sf.net&quot;&gt;gnuplot module&lt;/a&gt;, since I had already used &lt;a href=&quot;http://gnuplot.sourceforge.net/&quot;&gt;gnuplot&lt;/a&gt;itself for along time, and was familiar with the commands. In many waysit stillis a great module, but I stopped using it because it wouldn&apos;tplotdirectly from a Python interactive session. Since gnuplot isastand-alone plotting package, it has a great many features, manyofwhich are available from gnuplot-py.&lt;/p&gt;&lt;p&gt;I switched to &lt;a href=&quot;http://biggles.sf.net&quot;&gt;biggles&lt;/a&gt;,mostly because I could run it from Emacs, which is a real feature forme,since I really like to be able to edit a python script in emacsandthen hit C-c C-c and execute it. Biggles does nearly everythingIwant, but sometimes the labels come out looking a bit amateurish.&lt;/p&gt;&lt;p&gt;I first spotted &lt;a href=&quot;http://pyx.sf.net&quot;&gt;PyX&lt;/a&gt; on the &lt;a href=&quot;http://dkbza.org/11.0.html&quot;&gt;Python module&lt;/a&gt; for &lt;a href=&quot;http://www.texmacs.org&quot;&gt;texmacs&lt;/a&gt;. PyX appears to focusmostly on postscript output, and, because of that, has a great manyunique features. I always feel like I &lt;i&gt;should&lt;/i&gt; use PyX, but I&apos;venever actually broken down and used it.&lt;/p&gt;&lt;p&gt;Also in the category of things I feel like I should use but don&apos;t arethe &lt;a href=&quot;http://scipy.org&quot;&gt;Scipy&lt;/a&gt;plotting packages plt and gplt. I love Scipy, I use Scipy, I&apos;ve given atalk at a SciPymeeting, I&apos;ve met many of the people at Enthought. ButI&apos;ve neverused the plotting packages.&lt;/p&gt;&lt;p&gt;Which brings me to the hot kid right now, &lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;Matplotlib&lt;/a&gt;.Another one I&apos;venever used, but I&apos;m extremely tempted by it. They seemto havemindshare to burn, and the package appears to be verycapable.Certainly the plots &lt;a href=&quot;http://matplotlib.sourceforge.net/screenshots/finance_work2_large.png&quot;&gt;like this&lt;/a&gt; are pretty damn impressive! &lt;i&gt;Later&lt;/i&gt;:tried toinstalled matplotlib and failed. From CVS and from the pointrelease. However, the program is cool enough that I&apos;ll probably tryagain. More later.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;I have seen the future of Python plotting, and its name is &lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;matplotlib&lt;/a&gt;...&lt;/p&gt;&lt;p&gt;I played around a little bit more with &lt;a href=&quot;http://matplotlib.sf.net&quot;&gt;matplotlib&lt;/a&gt; today. Never was able to build from source on OS X, but found&lt;a href=&quot;http://undefined.org/python/packages.html&quot;&gt;a link to a precompiled binary&lt;/a&gt; that installed the matplotliblibraries into my version of MacPython. Nice.&lt;/p&gt;&lt;p&gt;Onfirst inspection, the code is very impressive, by far themostprofessional plotting package I&apos;ve used from Python. The abilitytouse different backends, although it complicates the buildproceedure,is genius.&lt;/p&gt;&lt;p&gt;I have to insert into the examples either &lt;/p&gt;&lt;pre&gt;import matplotlibmatplotlib.use(&apos;Agg&apos;)&lt;/pre&gt;to simply render to a file, or &lt;pre&gt;import matplotlibmatplotlib.use(&apos;WXAgg&apos;)&lt;/pre&gt;to use wxPython to render the images to the screen. Most everythingelse seems to work out of the box.&lt;p&gt;Myonly other complaint is that since the program uses wxPython torenderto the screen, I can&apos;t run from an emacs window, since emacsuses&apos;python&apos; and not the required &apos;pythonw&apos;. If anyone knows of asimplehack around this, I&apos;d appreciate hearing about it. Probably if Ibothered to read python.el something would suggest itself to me.&lt;/p&gt;&lt;p&gt;However, to be honest, I don&apos;t care. Matplotlib generates publication quality output.&lt;a href=&quot;http://biggles.sf.net&quot;&gt; Biggles&lt;/a&gt;, my previous favorite, no matter how nice and how convenient, did not. I think I have a new favorite. &lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a6</guid>			<pubDate>Tue, 29 Mar 2005 15:36:43 GMT</pubDate>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=6&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a6</comments>			</item>		<item>			<title>Optimizing Python</title>			<description>&lt;i&gt;Note: this is an archive of a post from the old bzero version ofFeeding the Snake that I wanted to&amp;nbsp; include with the newRadioUserland version.&lt;/i&gt;&lt;br&gt;I was flipping through the &lt;a href=&quot;http://wikipedia.org&quot;&gt;Wikipedia&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Python_programming_language&quot;&gt;article on Python&lt;/a&gt;earlier today. Really good article. I guess I shouldn&apos;t besurprised, since I&apos;ve seen so many good articles there, but I guess Ialways amamazed to see other people get python.&lt;p&gt;At the bottom of many wikipedia articles is a set of external links.On that list I found &lt;ahref =&quot;http://manatee.mojam.com/~skip/python/fastpython.html&quot;&gt;this article on Python Performance Tips. It&apos;s good, complete, and certainly mirrors much of my own experience with thelanguage. &lt;/ahref&gt;&lt;/p&gt;&lt;p&gt;I spent a lot of time reading a book by Stephan Goedecker called &lt;a href=&quot;http://www.amazon.com/exec/obidos/tg/detail/-/0898714842/qid=1109991282/sr=8-3/ref=sr_8_xs_ap_i3_xgl14/104-4955202-8432712?v=glance&amp;amp;s=books&amp;amp;n=507846&quot;&gt;Performance Optimization of Numerically Intensive Code&lt;/a&gt;. Ispent a lot of time wondering whether similar analysis could bemade ofPython. And spent too much time trying to optimize dotproducts inPython without any brilliant insights. The above web pageis the bestreference I&apos;ve found.&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a5</guid>			<pubDate>Tue, 29 Mar 2005 15:31:52 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=5&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a5</comments>			</item>		<item>			<title>Compiling and Linking to Math Libraries on OS X</title>			<description>If you&apos;re interested in squeezing speed out of your &lt;a href=&quot;http://numeric.scipy.org&quot;&gt;Numeric Python&lt;/a&gt; applications, you &lt;br&gt;will have to build Numpy using optimized math libraries.&lt;br&gt;&lt;br&gt;Mac OS X comes with a set of math libries build in, called Veclib.&lt;br&gt;&lt;br&gt;The secret code for linking to these libraries is&lt;pre&gt;-Wl,-framework -Wl,veclib&lt;/pre&gt;(which I have an incredibly hard time remembering).&lt;p&gt;The &lt;a href=&quot;http://hpc.sf.net&quot;&gt;High Performance Computing Tools forOS X&lt;/a&gt;website is great. I just downloaded the version of gfortranfrom thatsite, and got it running on my computer. The one point thatI didn&apos;tfind on the website is that you need to make sure that yourversion ofcctools is fairly recent (mine wasn&apos;t). I found a link to &lt;a href=&quot;ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg&quot;&gt;cctools-528&lt;/a&gt; that installed without incident, and I&apos;m now running gfortran without problem.&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a4</guid>			<pubDate>Tue, 29 Mar 2005 15:28:24 GMT</pubDate>			<category>Python</category>			<category>Science</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=4&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a4</comments>			</item>		<item>			<title>Vimes Release</title>			<description>&lt;span style=&quot;font-style: italic;&quot;&gt;Note: this is an older post from the bzero based version of Feeding the Snake that I&apos;m &lt;br&gt;including in the new RadioUserland version of the blog&lt;/span&gt;&lt;br&gt;&lt;br&gt;I released a new program called &lt;a href=&quot;http://vimes.sf.net&quot;&gt;Vimes&lt;/a&gt; this week over on &lt;a href=&quot;http://sf.net&quot;&gt;Sourceforge&lt;/a&gt;.Vimes (the Visual Interface toMaterials Simulations) is a program fordisplaying and controlingatomistic simulations programs. Vimes iswritten in &lt;a href=&quot;http://www.python.org&quot;&gt;Python&lt;/a&gt;, uses &lt;a href=&quot;http://pyopengl.sf.net&quot;&gt;OpenGL&lt;/a&gt;, to draw the moleculesand &lt;a href=&quot;http://wxpython.org&quot;&gt;wxwidgets&lt;/a&gt; for the widgets. &lt;p&gt;There&apos;s a nice article over at &lt;ahref =&quot;http://infoworld.com&quot;&gt;Infoworld by John Udell about the &lt;a href=&quot;http://weblog.infoworld.com/udell/2005/01/03.html&quot;&gt;UnsungHeroes of Open Source&lt;/a&gt;. I would nominate  &lt;a href=&quot;http://vrplumber.com&quot;&gt;Mike Fletcher&lt;/a&gt;,the prime movingforce behind Python OpenGL. Mike has given me tons offree help withPython/OpenGL programming simply because he&apos;s a nice guy.&lt;/ahref&gt;&lt;/p&gt;</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a3</guid>			<pubDate>Tue, 29 Mar 2005 15:21:55 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=3&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a3</comments>			</item>		<item>			<title>Simple Python Programming</title>			<description>&lt;span style=&quot;font-style: italic;&quot;&gt;Note: the following is a repeat of an old post from my bzero-based weblog that I&apos;m moving over to RadioUserland.&lt;/span&gt;&lt;br style=&quot;font-style: italic;&quot;&gt;&lt;br&gt; I&apos;m going to talk about how my Python programming has changedinthe years that I&apos;ve been using the language. I have my own littlePythonpackage that I call Pistol, which supposedly stands forPythonScientific Toolkit. It contains little applications that I use inmyday-to-day work (computational scientist at a NationalLaboratory).Some of the scripts have evolved over several years, andI&apos;m alwaysamused looking back at how my use of the language featureshaschanged. It&apos;s not, and never will be, a full-fledged project hostedatSourceforge, just a set of tools that I install on every machinethatI plan on using. &lt;p&gt;My absolute, all-time favorite toy in Matlabis the way they can makea graphical view of a matrix using the commandspcolor or spy. Thesecommands give you an instant view of where the bigvalues in a matrixare, which can be important if you&apos;re developingalgorithms to exploitthat structure. &lt;/p&gt;&lt;p&gt;Shortly after moving toPython, I realized that it was easier tosimply write my own littleversions of these in Python to view Numericarrays than to constantlykeep converting the matrices to/from Matlabformat. &lt;/p&gt;&lt;p&gt;When someonecomes from a static language like Fortran to a dynamiclanguage likePython, their initial forays into the language have asort of a&quot;deer-in-the-headlight&quot; look to them, like there are simplytoo manyshiny knobs to play with. My initial attempts at thesescripts are big,have classes to drive them, and use Tkinter to renderthe matrices. &lt;/p&gt;&lt;p&gt;I&apos;ve rewritten the scripts several times, and there are still tons ofthings wrong with them, but here&apos;s my current attempt... &lt;/p&gt;&lt;pre&gt;def spy_matrix_pil(A,fname=&apos;tmp.png&apos;,cutoff=0.1,do_outline=0,height=300,width=300):&lt;br&gt;    import Image,ImageDraw&lt;br&gt;    img = Image.new(&quot;RGB&quot;,(width,height),(255,255,255))&lt;br&gt;    draw = ImageDraw.Draw(img)&lt;br&gt;    n,m = A.shape    &lt;br&gt;    if n&amp;gt;width or m&amp;gt;height:&lt;br&gt;        raise &quot;Rectangle too big %d %d %d %d&quot; % (n,m,width,height)&lt;br&gt;    for i in range(n):&lt;br&gt;        xmin = width*i/float(n)&lt;br&gt;        xmax = width*(i+1)/float(n)&lt;br&gt;        for j in range(m):&lt;br&gt;            ymin = height*j/float(m)&lt;br&gt;            ymax = height*(j+1)/float(m)&lt;br&gt;            if abs(A[i,j]) &amp;gt; cutoff:&lt;br&gt;                if do_outline:&lt;br&gt;                    draw.rectangle((xmin,ymin,xmax,ymax),fill=(0,0,255),&lt;br&gt;                                        outline=(0,0,0))&lt;br&gt;                else:&lt;br&gt;                    draw.rectangle((xmin,ymin,xmax,ymax),fill=(0,0,255))&lt;br&gt;    img.save(fname)&lt;br&gt;    return&lt;/pre&gt;Shortand sweet. I started using PIL in favor of Tkinter, whichsimplified thestructure a great deal. There are lots of things thatI&apos;d like to change(most notably the fact that the size of the matrixshouldn&apos;t be relatedto the number of pixels in the image), but thisperforms a lot of workfor me.</description>			<guid>http://www.pycs.net/users/0000476/2005/03/29.html#a2</guid>			<pubDate>Tue, 29 Mar 2005 15:19:59 GMT</pubDate>			<category>Python</category>			<comments>http://www.pycs.net/system/comments.py?u=0000476&amp;amp;p=2&amp;amp;link=http%3A%2F%2Fwww.pycs.net%2Fusers%2F0000476%2F2005%2F03%2F29.html%23a2</comments>			</item>		</channel>	</rss>