<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>goodmami.org &#187; Software</title>
	<atom:link href="http://www.goodmami.org/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goodmami.org</link>
	<description>Homepage of Michael Wayne Goodman, student of computational linguistics at the University of Washington</description>
	<lastBuildDate>Sat, 04 Feb 2012 23:25:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Simple logging in Bash scripts</title>
		<link>http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/</link>
		<comments>http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 21:53:04 +0000</pubDate>
		<dc:creator>goodmami</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=62</guid>
		<description><![CDATA[I couldn&#8217;t find much mention of logging utilities for Linux shell scripting (namely Bash), so I wrote my own fairly quickly. I wanted several functions for various levels of logging (info, debug, warning, errors, etc), and a way to adjust what levels can be displayed. I followed the fairly standard convention of using numeric values [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find much mention of logging utilities for Linux shell scripting (namely Bash), so I wrote my own fairly quickly. I wanted several functions for various levels of logging (info, debug, warning, errors, etc), and a way to adjust what levels can be displayed. I followed the fairly standard convention of using numeric values for these levels and setting a &#8220;verbosity&#8221; level. If you know of an existing solution for Bash, let me know in the comments. Anyway, here&#8217;s the main idea:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span> <span style="color: #666666; font-style: italic;"># logging stream (file descriptor 3) defaults to STDERR</span><br />
<span style="color: #007800;">verbosity</span>=<span style="color: #000000;">2</span> <span style="color: #666666; font-style: italic;"># default to show warnings</span><br />
<span style="color: #007800;">silent_lvl</span>=<span style="color: #000000;">0</span><br />
<span style="color: #007800;">err_lvl</span>=<span style="color: #000000;">1</span><br />
<span style="color: #007800;">wrn_lvl</span>=<span style="color: #000000;">2</span><br />
<span style="color: #007800;">inf_lvl</span>=<span style="color: #000000;">3</span><br />
<span style="color: #007800;">dbg_lvl</span>=<span style="color: #000000;">4</span><br />
<br />
notify<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> log <span style="color: #007800;">$silent_lvl</span> <span style="color: #ff0000;">&quot;NOTE: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #666666; font-style: italic;"># Always prints</span><br />
error<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> log <span style="color: #007800;">$err_lvl</span> <span style="color: #ff0000;">&quot;ERROR: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
warn<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> log <span style="color: #007800;">$wrn_lvl</span> <span style="color: #ff0000;">&quot;WARNING: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
inf<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> log <span style="color: #007800;">$inf_lvl</span> <span style="color: #ff0000;">&quot;INFO: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #666666; font-style: italic;"># &quot;info&quot; is already a command</span><br />
debug<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> log <span style="color: #007800;">$dbg_lvl</span> <span style="color: #ff0000;">&quot;DEBUG: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
log<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$verbosity</span> <span style="color: #660033;">-ge</span> <span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Expand escaped characters, wrap at 70 chars, indent wrapped lines</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;$2&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> fold <span style="color: #660033;">-w70</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'2~1s/^/ &nbsp;/'</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">3</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>I added line wrapping and indenting so users don&#8217;t have to manually put in line-breaks to get nicer looking outputs, but there is the drawback that it makes the output harder to grep. Perhaps I should add an option to disable the line wrapping.</p>
<p><a href="http://goodmami.org/files/logging.bash">Here</a> is a longer example with some simple option parsing (apologies for using getopt; I&#8217;m currently looking for a better solution).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lightweight Music</title>
		<link>http://www.goodmami.org/2011/03/lightweight-music/</link>
		<comments>http://www.goodmami.org/2011/03/lightweight-music/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 11:09:15 +0000</pubDate>
		<dc:creator>goodmami</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=38</guid>
		<description><![CDATA[I was getting tired of the bloat and memory usage of Rhythmbox, so I was searching for a new music player/manager. After trying Muine and Decibel and not being totally satisfied, I finally (re)found MPD, the Music Player Daemon. Once I figured out how to set it up (not too hard, but more work than [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting tired of the bloat and memory usage of <a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a>, so I was searching for a new music player/manager. After trying <a href="http://muine.gooeylinux.org/">Muine</a> and <a href="decibel.silent-blade.org/">Decibel</a> and not being totally satisfied, I finally (re)found <a href="http://www.musicpd.org/">MPD</a>, the Music Player Daemon.</p>
<p>Once I figured out how to set it up (not too hard, but more work than usual), it&#8217;s been my favorite application for playing music. While GUI clients exist, I&#8217;ve been enjoying the command-line client MPC, as I can do things like this:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mpc listall <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Sigur <span style="color: #000000; font-weight: bold;">|</span> mpc add</div></td></tr></tbody></table></div>
<p>&#8230;which greps my whole music library for files with &#8220;Sigur&#8221; in the title, then adds them to the current playlist.</p>
<p>I also wanted to set up some key combos, so I didn&#8217;t have to execute commands in a terminal all the time. I used <a href="http://www.nongnu.org/xbindkeys/xbindkeys.html">XBindKeys</a> to bind some keys to mpc commands. For instance, the following commands toggles play/pause status (with Ctrl + the multimedia play button), skips to the next song (with Ctrl + multimedia next button), stops playback (with Ctrl + Alt + multimedia play button), and shows the currently playing song in a notification window (with Super + multimedia play button):</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000;">&quot;mpc toggle&quot;</span><br />
&nbsp; m:0x14 + c:<span style="color: #000000;">172</span><br />
&nbsp; Control+Mod2 + XF86AudioPlay</div></td></tr></tbody></table></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000;">&quot;mpc next&quot;</span><br />
&nbsp; m:0x14 + c:<span style="color: #000000;">171</span><br />
&nbsp; Control+Mod2 + XF86AudioNext</div></td></tr></tbody></table></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000;">&quot;mpc stop&quot;</span><br />
&nbsp; m:0x1c + c:<span style="color: #000000;">172</span><br />
&nbsp; Control+Alt+Mod2 + XF86AudioPlay</div></td></tr></tbody></table></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0000;">&quot;notify-send -u normal &quot;</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span>mpc current<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">&quot;&quot;</span><br />
&nbsp; m:0x50 + c:<span style="color: #000000;">172</span><br />
&nbsp; Mod2+Mod4 + XF86AudioPlay</div></td></tr></tbody></table></div>
<p>And what about memory usage? It&#8217;s currently playing a song and only using 8Mb. For comparison, I just fired up Rhythmbox and while idle it uses 47Mb.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2011/03/lightweight-music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomboy and note-sharing</title>
		<link>http://www.goodmami.org/2010/04/tomboy-and-note-sharing/</link>
		<comments>http://www.goodmami.org/2010/04/tomboy-and-note-sharing/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 23:17:11 +0000</pubDate>
		<dc:creator>goodmami</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[Tomboy]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=33</guid>
		<description><![CDATA[Other than as a place to quickly jot down ideas, phone numbers, etc., Tomboy&#8216;s most common purpose for me is as a study aid for my coursework. The ability to link the different topics, concepts, and people that I learn about is very useful. Of course, I&#8217;m not the only student in my classes, and [...]]]></description>
			<content:encoded><![CDATA[<p>Other than as a place to quickly jot down ideas, phone numbers, etc., <a href="http://projects.gnome.org/tomboy/">Tomboy</a>&#8216;s most common purpose for me is as a study aid for my coursework. The ability to link the different topics, concepts, and people that I learn about is very useful. Of course, I&#8217;m not the only student in my classes, and I introduced my study group to Tomboy and they love it. But now we have a new problem: note sharing. Since we are learning the same material, it would make sense if we could sync our notes together. And now we have another problem: we don&#8217;t want to share all of our notes, just the relevant ones.</p>
<p>Note-sharing is not a <a href="http://live.gnome.org/Tomboy/NoteSharing">new</a> <a href="http://live.gnome.org/Tomboy/PlaceForNewIdeas#Sharing_.28Networked_Tomboy.29">idea</a>, but it seems to have not been implemented yet. The basic ideas are that users of Tomboy should be able to get notes from others, give others their own notes, possibly sync them, resolve conflicts (as with synchronization), and be able to limit what notes are shared. Nobody seems to have mentioned real-time collaborative editing, but I don&#8217;t think it&#8217;s a good idea at this point, either.</p>
<p>I think there is not all that much that needs to be changed to allow sharing. Essentially, one must be able to synchronize subsets of notes, rather than all notes, and synchronize them in different locations (perhaps multiple). <a href="http://live.gnome.org/Tomboy/Notebooks">notebooks</a> have been implemented, and they do a decent job of grouping notes, but they don&#8217;t add all that much functionally. I think users should be able to sync single notes, notebooks, or all notes with various locations. By doing so, I could keep all of my notes synchronized with my <a href="https://one.ubuntu.com/">Ubuntu One</a> account, and also sync my notebook for course notes to another server. My classmates can have an account with this other server, and by syncing with it we are sharing notes. If there&#8217;s a conflict, Tomboy should solve it in the simplest way possible (maybe prefix the conflicting lines with the username of the author?), or allow a user to launch an external diffing tool, such as <a href="http://meld.sourceforge.net/">Meld</a> or <a href="http://en.wikipedia.org/wiki/WinDiff">WinDiff</a>.</p>
<p>I&#8217;m sure there are issues I haven&#8217;t thought about too hard, such as how to deal with links to notes that don&#8217;t exist (e.g. outside of a shared notebook), what happens when users change, say, notebook names, Tomboy version or plugin mismatches, etc. But on the surface it seems that expanding synchronization to allow for syncing subsets of notes will allow for simple sharing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2010/04/tomboy-and-note-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latex, Python, and CairoPlot</title>
		<link>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/</link>
		<comments>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 05:54:40 +0000</pubDate>
		<dc:creator>goodmami</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=22</guid>
		<description><![CDATA[CairoPlot is a Python module that uses the Cairo graphics package to produce great-looking charts easily. The results look really nice and are much simpler to create than many other packages, but up until now it has been suboptimal for use with LaTeX documents. I&#8217;ve been talking with the package maintainer and filing bugs about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://linil.wordpress.com/2008/09/16/cairoplot-11/">CairoPlot</a> is a Python module that uses the <a href="http://cairographics.org/">Cairo</a> graphics package to produce great-looking charts easily. The results look really nice and are much simpler to create than many other packages, but up until now it has been suboptimal for use with LaTeX documents. I&#8217;ve been talking with the package maintainer and filing bugs about these inadequacies, and my concerns were quickly addressed. See the <a href="http://launchpad.net/cairoplot">CairoPlot Launchpad page</a> to view the bugs filed against it.</p>
<p>I also recently found a blog post about <a href="http://www.imada.sdu.dk/~ehmsen/pythonlatex.php">embedding python in LaTeX files</a> [UPDATE: post appears to have gone offline. <a href="http://goodmami.org/files/python.sty">Here is a backup copy</a> of python.sty, thanks to <a href="http://www.stevecheckley.co.uk/blog/2011/06/16/cairoplot/">Steve Checkley</a>]. Using this with CairoPlot, it is easy to put the chart-producing code directly in my .tex files and compile. This reduces the extra step of making separate python scripts to produce these charts. Here is some sample code from a paper I&#8217;m currently writing:</p>
<div class="codecolorer-container python railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">\begin<span style="color: black;">&#123;</span>python<span style="color: black;">&#125;</span><br />
<span style="color: #ff7700;font-weight:bold;">import</span> cairoplot<br />
cairoplot.<span style="color: black;">vertical_bar_plot</span><span style="color: black;">&#40;</span><br />
&nbsp; <span style="color: #483d8b;">'dat/initial-grammar-stats.ps'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: black;">&#91;</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.87</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.82</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.83</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.50</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.70</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.11</span><span style="color: black;">&#93;</span> <span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff4500;">340</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">280</span><span style="color: #66cc66;">,</span> background <span style="color: #66cc66;">=</span> <span style="color: #008000;">None</span><span style="color: #66cc66;">,</span> border <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">10</span><span style="color: #66cc66;">,</span> grid <span style="color: #66cc66;">=</span> <span style="color: #008000;">True</span><span style="color: #66cc66;">,</span><br />
&nbsp; x_labels <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'Parses'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Generates'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Generates Original'</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; y_labels <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'%d%%'</span> % i <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">110</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; y_bounds <span style="color: #66cc66;">=</span> <span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span><br />
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\i</span>ncludegraphics{dat/initial-grammar-stats.ps}'</span><span style="color: black;">&#41;</span><br />
\end<span style="color: black;">&#123;</span>python<span style="color: black;">&#125;</span></div></td></tr></tbody></table></div>
<p>I do have some gripes about python.sty, though. I have to remember to use the latex command with the &#8220;&#8211;shell-escape&#8221; option. Also, it produces files for the python code, stderr and stdout output, and I don&#8217;t particularly care for the directory getting cluttered up with temporary files. Because of these annoyances, I might forgo the python.sty method and just keep a python script that generates all the charts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

