<?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>Kristopher Overholt &#187; Python</title>
	<atom:link href="http://www.koverholt.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.koverholt.com</link>
	<description>Fire Protection Engineering Tools, Notes, and Projects</description>
	<lastBuildDate>Wed, 25 Jan 2012 22:44:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New web calculator &#8211; t-squared fire ramp generator</title>
		<link>http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/</link>
		<comments>http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 00:05:57 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[FDS]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FPE]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=1349</guid>
		<description><![CDATA[Wondering when an ultrafast t-squared fire reaches 2,000 kW? 104 seconds! Or just want to quickly generate a slow t-squared curve to use in FDS? I’ve posted a new web calculator tool to generate t-squared fires, output plots, CSV files, and FDS syntax. The t-squared fire ramp calculator is available here: http://www.koverholt.com/t-squared-fire-ramp-calculator/ Please let me [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2011/03/inverse-fire-modeling-for-heat-release-rate-characterization/' rel='bookmark' title='Inverse fire modeling for heat release rate characterization'>Inverse fire modeling for heat release rate characterization</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Wondering when an ultrafast t-squared fire reaches 2,000 kW? 104 seconds! Or just want to quickly generate a slow t-squared curve to use in FDS? I’ve posted a new web calculator tool to generate t-squared fires, output plots, CSV files, and FDS syntax.</p>
<p>The t-squared fire ramp calculator is available here:</p>
<p><a href="http://www.koverholt.com/t-squared-fire-ramp-calculator/">http://www.koverholt.com/t-squared-fire-ramp-calculator/</a></p>
<p>Please let me know if you find any bugs, would like to give feedback on this tool, or have a request for another web calculator!</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2011/03/inverse-fire-modeling-for-heat-release-rate-characterization/' rel='bookmark' title='Inverse fire modeling for heat release rate characterization'>Inverse fire modeling for heat release rate characterization</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to compile CFAST on Mac OS X and Linux</title>
		<link>http://www.koverholt.com/2011/07/how-to-compile-cfast-on-mac-os-x-and-linux/</link>
		<comments>http://www.koverholt.com/2011/07/how-to-compile-cfast-on-mac-os-x-and-linux/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 04:57:52 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[CFAST]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FORTRAN]]></category>
		<category><![CDATA[NIST]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=1208</guid>
		<description><![CDATA[The Consolidated Model of Fire and Smoke Transport (CFAST) model is a two-zone fire model developed by NIST. From the NIST website, you can download the Windows version of CFAST, which includes a graphical user interface frontend (CEdit) for the creation and execution of CFAST cases. However, there are no downloadable CFAST binaries or user interfaces [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/mac-corrected-numerical-analysis-fortran-programs/' rel='bookmark' title='Mac-Corrected Numerical Analysis Fortran Programs'>Mac-Corrected Numerical Analysis Fortran Programs</a></li>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.nist.gov/el/fire_research/cfast.cfm">Consolidated Model of Fire and Smoke Transport (CFAST</a>) model is a two-zone fire model developed by NIST. From the NIST website, you can download the Windows version of CFAST, which includes a graphical user interface frontend (CEdit) for the creation and execution of CFAST cases. However, there are no downloadable CFAST binaries or user interfaces for the Mac and Linux platforms; you must compile CFAST yourself.</p>
<p>This guide will help you compile the CFAST executable on Mac OS X and Linux. This is useful for running CFAST cases on Mac or Linux machines, which is especially useful for scripting CFAST runs for optimization problems or running CFAST on a large number of cases in batch mode.</p>
<p>You will need the Intel Fortran compilers (<a href="http://software.intel.com/en-us/articles/intel-compilers/">ifort</a>) and a copy of the CFAST source code from the <a href="http://code.google.com/p/cfast/">CFAST Google Code site</a>. You can try to use other free compilers, but I find that the Intel compilers are the most compatible and produce the most optimized (fastest) binaries. Note: there are heavily discounted <a href="http://software.intel.com/en-us/articles/intel-education-offerings/">Intel compilers for students</a>.</p>
<p>To download the CFAST source code, the easiest way is to install <a href="http://subversion.tigris.org/">subversion</a> on your Mac or Linux machine and issue the following command:</p>
<p style="padding-left: 30px;"><em>svn co http://cfast.googlecode.com/svn/trunk/ cfast</em></p>
<p>Once you have the CFAST source code on your machine, you can perform the following steps to compile the CFAST executable.</p>
<blockquote><p><strong>1.</strong> In the <em>cfast/CFAST/</em> directory, edit the <em>makefile_linux</em> file and make the following changes:</p>
<ul>
<li>Replace ‘radation’ with ‘radiation’; this is a typo</li>
<li>Add &#8216;cyl_conduct.o&#8217;, &#8216;datamodules.o&#8217;, and &#8216;ssHeaders.f&#8217; to the <em>obj_serial</em> section</li>
<li>Add the following lines to the <em>Object Dependencies</em> section:</li>
<ul>
<li>cyl_conduct.o : cyl_conduct.f</li>
<li>datamodules.o : datamodules.f90</li>
<li>ssHeaders.o : ssHeaders.f</li>
</ul>
<li>Add &#8216;cyl_conduct.f&#8217;, &#8216;datamodules.f90&#8242;, and &#8216;ssHeaders.f&#8217; to the <em>cfast.o </em>line</li>
</ul>
<p>Note: The corrected makefile can also be downloaded from <a href="https://github.com/koverholt/fds-tools/blob/master/cfast_makefile_osx_linux/makefile_linux">here</a>.</p>
<p><strong>2.</strong> Copy <em>datamodules.f90</em> from the <em>cfast/CFAST/Include/</em> directory to the <em>cfast/CFAST/Source/ </em>directory</p>
<p><strong>3.</strong> Change to the <em>cfast/CFAST/Source/</em> directory</p>
<p><strong>4.</strong> Run the command ‘ifort -c datamodules.f90&#8242; to compile the datamodules and iofiles modules</p>
<p><strong>5.</strong> Finally, run the command ‘make -f ../makefile_linux intel_osx_64’ to build CFAST</p>
<p><strong>5b.</strong> If you are running Linux, the command is &#8216;make -f ../makefile_linux intel_linux&#8217;</p></blockquote>
<p>Using these steps, I was able to build CFAST on an Intel Macbook Pro running 10.6 (Snow Leopard) as well as a Linux machine running CentOS release 5.6 with the 64-bit Intel Fortran Compiler version 12.0.4.184.</p>
<div>
<p>With your new CFAST executable file (cfast_osx_intel_64), you can run a CFAST case using the following syntax:</p>
<p style="padding-left: 30px;"><em>./cfast_osx_intel_64 casename</em></p>
</div>
<div>where casename is the name of your CFAST casename.in file (notice the .in file extension is omitted from the command).</div>
<div></div>
<div>Happy modeling!</div>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/mac-corrected-numerical-analysis-fortran-programs/' rel='bookmark' title='Mac-Corrected Numerical Analysis Fortran Programs'>Mac-Corrected Numerical Analysis Fortran Programs</a></li>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2011/07/how-to-compile-cfast-on-mac-os-x-and-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inverse fire modeling for heat release rate characterization</title>
		<link>http://www.koverholt.com/2011/03/inverse-fire-modeling-for-heat-release-rate-characterization/</link>
		<comments>http://www.koverholt.com/2011/03/inverse-fire-modeling-for-heat-release-rate-characterization/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 16:51:48 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[FDS]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FPE]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=1127</guid>
		<description><![CDATA[Attached are my PDF slides on the topic of &#8220;Inverse fire modeling for heat release rate characterization&#8220;, which was presented at the 7th US National Combustion Meeting in Atlanta, GA on March 21, 2011. The abstract is as follows: A ubiquitous source of uncertainty in fire modeling is the proper heat release rate for the [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/10/the-arrival-of-collaboration-in-fire-protection-engineering/' rel='bookmark' title='The Arrival of Collaboration in Fire Protection Engineering'>The Arrival of Collaboration in Fire Protection Engineering</a></li>
<li><a href='http://www.koverholt.com/2011/04/grassland-fire-research-at-the-university-of-texas-at-austin/' rel='bookmark' title='Grassland fire research at The University of Texas at Austin'>Grassland fire research at The University of Texas at Austin</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Attached are my PDF slides on the topic of &#8220;<a href="http://www.koverholt.com/wp-content/uploads/2011/03/overholt_combustion_2011.pdf">Inverse fire modeling for heat release rate characterization</a>&#8220;, which was presented at the 7th US National Combustion Meeting in Atlanta, GA on March 21, 2011.</p>
<p>The abstract is as follows:</p>
<blockquote><p>A ubiquitous source of uncertainty in fire modeling is the proper heat release rate for the fuel packages of interest. An inverse heat release rate (HRR) calculation method is presented to determine a HRR that satisfies measured temperature data. The methodology is developed by using synthetic temperature data using the Consolidated Model of Fire and Smoke Transport (CFAST) zone model to produce hot gas layer temperatures in a single compartment. The inverse HRR method runs at super-real-time speeds while calculating an inverse HRR solution that can reasonably well match the original HRR curve. Examples of the inverse HRR method are demonstrated by using a multiple step HRR case, experimental data with a constant HRR, and complex HRR curves. In principle, the methodology can be applied using any reasonably accurate fire model to invert for the HRR.</p></blockquote>
<p>The slides can be downloaded here: <a href="http://www.koverholt.com/wp-content/uploads/2011/03/overholt_combustion_2011.pdf">Overholt_Combustion_2011</a></p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/10/the-arrival-of-collaboration-in-fire-protection-engineering/' rel='bookmark' title='The Arrival of Collaboration in Fire Protection Engineering'>The Arrival of Collaboration in Fire Protection Engineering</a></li>
<li><a href='http://www.koverholt.com/2011/04/grassland-fire-research-at-the-university-of-texas-at-austin/' rel='bookmark' title='Grassland fire research at The University of Texas at Austin'>Grassland fire research at The University of Texas at Austin</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2011/03/inverse-fire-modeling-for-heat-release-rate-characterization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New web calculator &#8211; flame heights and plume centerline temperatures</title>
		<link>http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/</link>
		<comments>http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 08:32:05 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[FDS]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FPE]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=1099</guid>
		<description><![CDATA[I’ve posted a new web calculator tool to calculate flame heights and plume centerline temperatures (above the flame height). The calculator is based on the correlations by Heskestad and McCaffrey, and is available here: http://www.koverholt.com/flame-height-and-plume-centerline-temperature-calculator/ Please let me know if you find any bugs, would like to give feedback on this tool, or have a [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
<li><a href='http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/' rel='bookmark' title='New web calculator &#8211; t-squared fire ramp generator'>New web calculator &#8211; t-squared fire ramp generator</a></li>
<li><a href='http://www.koverholt.com/2009/11/plotting-data-on-videos/' rel='bookmark' title='Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information'>Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I’ve posted a new web calculator tool to calculate flame heights and plume centerline temperatures (above the flame height). The calculator is based on the correlations by Heskestad and McCaffrey, and is available here:</p>
<p><a href="http://www.koverholt.com/flame-height-and-plume-centerline-temperature-calculator/">http://www.koverholt.com/flame-height-and-plume-centerline-temperature-calculator/</a></p>
<p>Please let me know if you find any bugs, would like to give feedback on this tool, or have a request for another web calculator!</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
<li><a href='http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/' rel='bookmark' title='New web calculator &#8211; t-squared fire ramp generator'>New web calculator &#8211; t-squared fire ramp generator</a></li>
<li><a href='http://www.koverholt.com/2009/11/plotting-data-on-videos/' rel='bookmark' title='Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information'>Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New web calculator tool &#8211; transient steel heating under fire conditions</title>
		<link>http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/</link>
		<comments>http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 04:55:29 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[FDS]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FPE]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=1030</guid>
		<description><![CDATA[I&#8217;ve posted a new web calculator tool related to structural fire safety to calculate the lumped temperature of steel under fire conditions. The tool has the ability to input parameters for steel, select a standard fire time-temperature curve (ISO or ASTM), and choose unprotected or protected steel. The tool is based on the equations from [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/' rel='bookmark' title='New web calculator &#8211; t-squared fire ramp generator'>New web calculator &#8211; t-squared fire ramp generator</a></li>
<li><a href='http://www.koverholt.com/2009/11/plotting-data-on-videos/' rel='bookmark' title='Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information'>Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted a new web calculator tool related to structural fire safety to calculate the lumped temperature of steel under fire conditions. The tool has the ability to input parameters for steel, select a standard fire time-temperature curve (ISO or ASTM), and choose unprotected or protected steel. The tool is based on the equations from the textbook by A. Buchanan, <a href="http://www.amazon.com/Structural-Design-Safety-Andrew-Buchanan/dp/047189060X">Structural Design For Fire Safety</a>, and is available here:</p>
<p><a href="http://www.koverholt.com/transient-steel-heating-under-fire-conditions/">http://www.koverholt.com/transient-steel-heating-under-fire-conditions/</a></p>
<p>I hope you find the calculator useful, and I will continue to add web tools for fire protection engineering calculations. I will be adding a more detailed explanation and equations to the steel heating calculator page in the near future as well as releasing the source code.</p>
<p>Please let me know if you find any bugs, would like to give feedback on this tool, or have a request for another web calculator! The next web tool will be a calculator to give results from the Heskestad flame height and centerline temperatures.</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2012/01/new-web-calculator-t-squared-fire-ramp-generator/' rel='bookmark' title='New web calculator &#8211; t-squared fire ramp generator'>New web calculator &#8211; t-squared fire ramp generator</a></li>
<li><a href='http://www.koverholt.com/2009/11/plotting-data-on-videos/' rel='bookmark' title='Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information'>Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plotting data on videos &#8211; A useful way to convey qualitative and quantitive information</title>
		<link>http://www.koverholt.com/2009/11/plotting-data-on-videos/</link>
		<comments>http://www.koverholt.com/2009/11/plotting-data-on-videos/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 08:49:44 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[FPE]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/?p=731</guid>
		<description><![CDATA[Every once in a while, someone makes an impression on you that lasts for a lifetime. It sticks with you every single time. This is one of those, although a bit on the nerdy side, it is one that can change the way you present information in a very meaningful way. I was once sitting [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2008/09/passionate-and-artful-communication-in-science/' rel='bookmark' title='Passionate and Artful Communication in Science'>Passionate and Artful Communication in Science</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" style="border: 0px initial initial;" title="flameheight_boxscale_cb_rad1" src="http://www.koverholt.com/wp-content/uploads/2009/11/flameheight_boxscale_cb_rad12.png" alt="flameheight_boxscale_cb_rad1" width="500" height="375" /></p>
<p style="text-align: center;">
<p></br><br />
Every once in a while, someone makes an impression on you that lasts for a lifetime. It sticks with you every single time. This is one of those, although a bit on the nerdy side, it is one that can change the way you present information in a very meaningful way.</p>
<p style="text-align: left;">I was once sitting at the NIST annual fire conference, going about my business, and someone working on a project regarding the structural response aspect of buildings on fire showed a video in their presentation. No big deal, right? Normally, we get cool fire videos, then some plots, and so on. Sometimes the plots are interesting, sometimes they are default from Excel with the ugly legend and all &#8211; with no story to tell.</p>
<p>But not this guy. He showed a video with real-time plots superimposed over the video showing the exact real-time structural response of the structure overlaid on the video in a plot. &#8220;AMAZING!&#8221; I thought. And it stuck with me. A useful way to convey synchronous information. People love videos, why not tell the qualitative AND quantitative story at the same time?</p>
<p>So I started working in grad. school on fire problems, and naturally, soon thereafter, I was scheduled to give a presentation. As most of my real creative coding and writing work happens of hours between the hours of 1 AM and 6 AM, I wanted to make this happen. I REALLY wanted some real-time plotting action in my presentation. No Excel templates for me! So I stayed up for a couple nights and worked on a way to use MATLAB to make this plotting dream a reality: I worked on importing videos, messing with frame rates, tons of images, and so forth. And soon thereafter, it happened. I had a working script.</p>
<p>I used it to show plots of large-scale fire tests with actual and predicted flame heights vs. time as seen here:</br></br></p>
<p style="text-align: center;"><a href="http://www.koverholt.com/2009/11/plotting-data-on-videos/"><img src="http://img.youtube.com/vi/yyWyOsPuRNo/default.jpg" width="130" height="97" border=0></a></p>
<p style="text-align: center;">
<p></br><br />
And I used the script to show the predicted flame heights on a small-scale test in an amazing way that just about anyone can relate to, fire-crazed scientist or not:</br></br></p>
<p style="text-align: center;"><a href="http://www.koverholt.com/2009/11/plotting-data-on-videos/"><img src="http://img.youtube.com/vi/Nu9s57fyKdU/default.jpg" width="130" height="97" border=0></a></p>
<p style="text-align: center;">
<p></br><br />
From anyone who has seen the videos firsthand, the response has been amazing. This is a great teaching and communication tool, and surprisingly enough, I haven&#8217;t found any existing program or tool that does this. And so I am sharing the videos and script here for anyone to use to better convey information.</p>
<p>My next steps are: 1) to convert the script to Python (since I am now almost exclusively using Python+numpy+scipy for my graduate research and daily work instead of MATLAB, and 2) to make the script into a cross-platform and easy to use tool.</p>
<p>I&#8217;m providing the code in its raw and uncommented and unedited form. It generates a number of images with plots superimposed on them, and then it is trivial to use a program to stitch them together into a video. I used Quicktime&#8217;s built in method. Sorry, too much current work going on finishing my MS thesis and Master&#8217;s degree to clean up the code, but it&#8217;s a brutal use of the &#8220;release early, release often&#8221; ideal! Hopefully someone can make some use of it.</p>
<p>So, here are the linked .m files:</p>
<p><a href="http://www.koverholt.com/scripts/ssPlotVideo.m">http://www.koverholt.com/scripts/ssPlotVideo.m</a><br />
<a href="http://www.koverholt.com/scripts/fireplotVideo.m"> http://www.koverholt.com/scripts/fireplotVideo.m</a></p>
<p>Enjoy! And please leave your comments or ideas!</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-flame-heights-and-plume-centerline-temperatures/' rel='bookmark' title='New web calculator &#8211; flame heights and plume centerline temperatures'>New web calculator &#8211; flame heights and plume centerline temperatures</a></li>
<li><a href='http://www.koverholt.com/2008/09/passionate-and-artful-communication-in-science/' rel='bookmark' title='Passionate and Artful Communication in Science'>Passionate and Artful Communication in Science</a></li>
<li><a href='http://www.koverholt.com/2011/02/new-web-calculator-tool-transient-steel-heating-under-fire-conditions/' rel='bookmark' title='New web calculator tool &#8211; transient steel heating under fire conditions'>New web calculator tool &#8211; transient steel heating under fire conditions</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2009/11/plotting-data-on-videos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Golden Resource List for Python Beginners</title>
		<link>http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/</link>
		<comments>http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 14:17:30 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/2008/03/17/the-golden-resource-list-for-python-beginners/</guid>
		<description><![CDATA[After years of being a master-of-none with programming languages, I have finally settled on one to delve deeper into: Python. I&#8217;ve been learning Python for about a month now, and it has been quite pleasurable. Although the language has been around since 1991, it has been gaining in popularity in the recent years and is [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/' rel='bookmark' title='The clarity of Python vs. the cloud of Perl'>The clarity of Python vs. the cloud of Perl</a></li>
<li><a href='http://www.koverholt.com/2010/05/python-importerror-of-backend_wx2-8-and-wxpython-when-using-matplotlib/' rel='bookmark' title='Python ImportError with backend_wx2.8 and wxPython when using Matplotlib'>Python ImportError with backend_wx2.8 and wxPython when using Matplotlib</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>After years of being a master-of-none with programming languages, I have finally settled on one to delve deeper into: Python. I&#8217;ve been learning Python for about a month now, and it has been quite pleasurable. Although the language has been around since 1991, it has been gaining in popularity in the recent years and is used in many underlying projects at Google, Youtube, NASA, Honeywell, and the University of Maryland to name a few. It is an excellent language for a programmer of any level to pick up, and I chose it because of its versatility, clear syntax, and ease of use for transforming my ideas into a a functional and high level language.</p>
<p>Along the way during the past month, I have sifted through hundreds of websites and quite a few beginner books. So here, I would like to share the links that I found most helpful in my quest for Python knowledge. As far as my past experience, I&#8217;ve dabbled in many other languages such as MATLAB, HTML, Fortran, C++, Java, Perl, and so on but never really grew to master a single one or use it in my daily life.</p>
<p>So, without further delay, on to the list:</p>
<blockquote>
<h2>Before You Start With Python</h2>
<ol>
<li><a href="http://www.python.org">Python.org</a> &#8211; I couldn&#8217;t make this list without including the main Python site. There is just a great amount of information there. Plus everything I link to can probably be found there, but my list is only those resources that really helped me along in my learning experience.<a href="http://www.norvig.com/21-days.html"><br />
</a></li>
<li><a href="http://www.norvig.com/21-days.html">Teach Yourself Programming in Ten Years</a> &#8211; Article by the director of research at Google &#8211; A great overview of programming and learning to program, all the while avoiding the ides presented by the &#8220;Learn to program in X days&#8221; books.</li>
</ol>
</blockquote>
<blockquote>
<h2>Excellent Python Tutorials</h2>
<ol>
<li><a href="http://diveintopython.org/">Dive Into Python</a> &#8211; This is one of the first tutorials that I read about Python, and it gave me an excellent overview of the language. It really broke down the code line-by-line, but it still reads like a mix between a reference guide, a cookbook, and a tutorial. It&#8217;s a freely available book and should definitely be within quick reach as you learn Python.</li>
<li><a href="http://openbookproject.net/thinkCSpy/">How to Think Like a Computer Scientist</a> &#8211; This is by far my favorite tutorial in the entire list. I like this (freely available) book because of its plentiful and challenging exercises! I am usually picky when choosing textbooks on a new subject, and I will almost always get the book that has the most examples in it. I spent most of my time creating my own programs at the end of each chapter, and really got a feel for the language (and a nice sense of accomplishment!) at the end of each chapter. Highly recommended.</li>
<li><a href="http://showmedo.com/videos/beginner_programming?topic=python">Python Videos at ShowMeDo </a> &#8211; There are over 100 videos at the time of this posting over a wide range of topics. Anything from how to open a Python session to namespaces and more. It was nice when starting out to just sit and watch someone who knew what they were doing do routine tasks, and it helped to ground basic concepts before jumping in on my own. Don&#8217;t forget to thank the creators of the videos with a comment!</li>
<li><a href="http://www.freenetpages.co.uk/hp/alan.gauld/">Learning to Program</a> &#8211; This is one that I am going through last, because it gets into a bit more in depth discussion about basic and moderate topics. Very thorough.<a href="http://www.freenetpages.co.uk/hp/alan.gauld/"><br />
</a></li>
</ol>
</blockquote>
<blockquote>
<h2>Beginner Exercises and Projects</h2>
<ol>
<li><a href="http://openbookproject.net/thinkCSpy/">How to Think Like a Computer Scientist</a> &#8211; I just HAD to list this again, because it goes at just the right pace and the exercises are well thought out. I am convinced that I really learned about 80% of my Python basics here when I put them to practice. Learn by doing!</li>
<li><a href="http://www.daniweb.com/forums/showthread.php?t=32007">Projects for the Beginner &#8211; Python</a> &#8211; This is a thread on a forum with over 100 ideas for programs. Use this when you are low on inspiration but high on ambition!</li>
<li><a href="http://www.pythonchallenge.com/">Python Challenge</a> &#8211; Neat implementation of puzzles that can be solved with Python scripts. They get harder as you progress levels. You might want to hit up the Python Challenge after getting a good hold on the basics and after you have many of these other links open in other tabs. <img src='http://www.koverholt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><a href="http://www.uselesspython.com/pythonchallenge.html">Useless Python Challenges</a> &#8211; This site should be visited after you have finished all of the trivial Python exercises and projects. When you are self-sustaining on the language and eagerly looking for some projects to do, but are hitting a writer&#8217;s block for programs, go here.</li>
</ol>
</blockquote>
<blockquote>
<h2>Beginner Forums and Lists</h2>
<ol>
<li><a href="http://python-forum.org/pythonforum/">Python Forum &#8211; Beginners</a> &#8211; Not a very high traffic forum, but they have a beginners subforum with 15-30 posts per day, just enough to keep you busy. I find it helpful to attack the problems that other beginners are facing. And if you come up with a good solution, post it and help others while you learn. Everyone wins!</li>
<li><a href="http://learningpython.com/">Learning Python Blog</a> &#8211;  One of the few &#8220;learning only&#8221; Python blogs. It is always good to see information shared from others while they learn. Sort of like this list. <img src='http://www.koverholt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><a href="http://mail.python.org/mailman/listinfo/tutor">Python Tutor Mailing List</a> &#8211; I only recently signed up for this, but I must say that there are some very knowledgeable and helpful people on here and it keeps the Python information coming at you via email. Seems to be quite a few students on here and you will most certainly learn something with each email thread.</li>
</ol>
</blockquote>
<blockquote>
<h2>Interesting Python Projects and Libraries</h2>
<ol>
<li><a href="http://www.djangoproject.com/">Django Project<br />
</a></li>
<li><a href="http://www.turbogears.org/">TurboGears</a></li>
<li><a href="http://code.google.com/p/gdata-python-client/">Google GData Python API</a> &#8211; This is an amazing API from Google that allows you to interact with Google Calendar, Docs, Maps, Youtube, Notebook, and so on. It is very easy to install and use and I look forward to developing with this in the near future.</li>
<li><a href="http://www.wxpython.org/">wxPython</a> &#8211; GUI toolkit for interface development. I haven&#8217;t gotten to GUIs yet, but everywhere I turn I see references to wxPython.</li>
<li><a href="http://matplotlib.sourceforge.net/">matplotlib</a> &#8211; 2D plotting library that produces very nice looking graphs. Supports many, many types of graphs and is very customizable.</li>
<li><a href="http://ipython.scipy.org/moin/">SciPy</a> &#8211; A collection of Python tools and modules for use in science, engineering, and mathematics. This is the light at the end of the tunnel for me and I hope to get more involved with this library as I progress with my Python learning.</li>
</ol>
</blockquote>
<blockquote>
<h2>Editing Tools and Shells</h2>
<ol>
<li><a href="http://ipython.scipy.org/moin/FrontPage">iPython</a> &#8211; An enhanced Python shell that seems geared towards science, engineering, and high performance computing.</li>
<li><a href="http://macromates.com/">TextMate </a>(Mac OS X) &#8211; This is such an amazing editor that I must list it here. I didn&#8217;t use it at all before I started with Python, and now I simply cannot go without it. I had previously heard it described by programmers as a magical tool, but I had no idea. It does autocompletion based on previous words, syntax highlighting for a ton of languages, has a quick and easy-to-read method to execute Python scripts. It is perhaps the only non-free item in my list, but very much worth it!<a href="http://macromates.com/"><br />
</a></li>
<li><a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> (Mac OS X) &#8211; This is what I used for a couple of years&#8230; until I discovered the greatness of TextMate a few weeks ago. TextWrangler is free though if you wish to use it.</li>
</ol>
</blockquote>
<blockquote>
<h2>Other Resources (References, Packages, Hosting)</h2>
<ol>
<li><a href="http://docs.python.org/lib/lib.html">Python Library Reference</a> &#8211; Huge list of explanations about Python&#8217;s Standard Library. Made to help you discover the power of Python in your everyday programming.</li>
<li><a href="http://wiki.python.org/moin/PythonHosting">Python Webhosting</a> &#8211; List of webhosts that offer Python solutions on their webhost. Python can be run on most hosts via CGI, but these wiki pages explain exactly how they implement Python usability. Plus I found out about the cool idea of <a href="http://www.hcoop.net">HCoop</a> cooperative web hosting through this list; this is the host on which you are reading this blog. <img src='http://www.koverholt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><a href="http://pypi.python.org/pypi">Python Package Index</a> &#8211; Directory of Python packages that you can learn about, download, and use in your own programming. Don&#8217;t reinvent the wheel!</li>
<li><a href="http://aspn.activestate.com/ASPN/Python/Cookbook/">Python Cookbook Code Samples</a> &#8211; This is a directory in the same vein as the previous listing, but the solutions to problems are presented as code with user comments. As of now there are over 2000 recipes.</li>
<li><a href="http://pythonware.com/daily/">The Daily Python URL</a> &#8211; Just as it sounds. News about Python in compact form.</li>
</ol>
</blockquote>
<p>Again, while there are many, many other resources for learning Python, this is a list of my personal favorites. These are the specific sites that have been very helpful and impacting on my venture to learn Python. So while I may not have listed a particular item &#8211; I probably saw it, but didn&#8217;t get much from it at this time.</p>
<p>Finally, you must forgive me if I got some detail wrong. I am learning, after all! Hopefully this list will help new and moderate Python users to utilize some of the best (and free!) Python resources that others have put up for all to learn from. Thanks to those people who shared their knowledge. And have fun with Python!</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/' rel='bookmark' title='The clarity of Python vs. the cloud of Perl'>The clarity of Python vs. the cloud of Perl</a></li>
<li><a href='http://www.koverholt.com/2010/05/python-importerror-of-backend_wx2-8-and-wxpython-when-using-matplotlib/' rel='bookmark' title='Python ImportError with backend_wx2.8 and wxPython when using Matplotlib'>Python ImportError with backend_wx2.8 and wxPython when using Matplotlib</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</title>
		<link>http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/</link>
		<comments>http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 03:26:38 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.koverholt.com/2008/03/16/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/</guid>
		<description><![CDATA[I am going through the Python tutorial &#8220;How to Think Like a Computer Scientist&#8221; right now, and it is an excellent source for beginner/intermediate Python hands-on learning. http://openbookproject.net/thinkCSpy/ However, when I got to chapter 8, my fun stopped right away. The author refers to a Python library called GASP (Graphics API for Students of Python) [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/' rel='bookmark' title='The Golden Resource List for Python Beginners'>The Golden Resource List for Python Beginners</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/' rel='bookmark' title='The clarity of Python vs. the cloud of Perl'>The clarity of Python vs. the cloud of Perl</a></li>
<li><a href='http://www.koverholt.com/2011/07/how-to-compile-cfast-on-mac-os-x-and-linux/' rel='bookmark' title='How to compile CFAST on Mac OS X and Linux'>How to compile CFAST on Mac OS X and Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I am going through the Python tutorial &#8220;How to Think Like a Computer Scientist&#8221; right now, and it is an excellent source for beginner/intermediate Python hands-on learning.</p>
<p><a href="http://openbookproject.net/thinkCSpy/">http://openbookproject.net/thinkCSpy/</a></p>
<p>However, when I got to chapter 8, my fun stopped right away. The author refers to a Python library called GASP (Graphics API for Students of Python) and gives an example and case study of a small game. The thing is, he doesn&#8217;t tell you how to install the module and it abruptly interrupts your lovely Python learning experience.</p>
<p><a href="http://openbookproject.net/thinkCSpy/ch08.xhtml">http://openbookproject.net/thinkCSpy/ch08.xhtml</a></p>
<p>I tried to use easy_install to install most of these, and it always ended up failing for some reason or another.</p>
<p>As I am using Mac OS X Leopard, I will provide the missing instructions for how to get the gasp module installed (and its dependencies) for anyone else who runs into this situation:</p>
<blockquote>
<h2>How to install PyObjC, pygame, and gasp on Mac OS X</h2>
<ol>
<li>I assume that you have already installed some version of Python; I am using Universal Python 2.5 from <a href="http://www.pythonmac.org/packages/">http://www.pythonmac.org/packages/</a> which is a nice, easy-to-install package and has other prebuilt packages like numpy, wxPython, matplotlib, etc. ready to be installed. You can see other ways to get Python on your Mac at <a href="http://wiki.python.org/moin/MacPython/PythonDistributionsForMac">http://wiki.python.org/moin/MacPython/PythonDistributionsForMac </a></li>
<li>You will need to install PyObjC, which is also available as a package from <a href="http://www.pythonmac.org/packages/">http://www.pythonmac.org/packages/</a> under the 2.5 link.</li>
<li>Now, you will install pygame from a package (pygame-1.8.0rc4-py2.5-macosx10.4.mpkg.zip) available at <a href="http://rene.f0o.com/~rene/stuff/macosx/">http://rene.f0o.com/~rene/stuff/macosx/</a>. This is linked from <a href="http://www.pygame.org/download.shtml">http://www.pygame.org/download.shtml<br />
</a></li>
<li>Finally, we get to the part of installing gasp, which is confusing to find in itself. The FAQ page is at <a href="https://answers.launchpad.net/gasp-code/+faq/42">https://answers.launchpad.net/gasp-code/+faq/42</a> but the link to download is wrong. Get it from <a href="https://launchpad.net/gasp-code/+download">https://launchpad.net/gasp-code/+download</a>. You will want to download the <strong>Code Release</strong> which is currently called python-gasp-0.1.1.tar.bz2.</li>
<li>Extract the bz2 file and there will be a folder inside called gasp. Copy this folder to the  /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ directory and you will be in business!
<p>This is the command that I used: sudo cp -R ~/Desktop/python-gasp-0.1.1/gasp/ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/gasp</li>
<li>Open a python session and type <strong>import pygame</strong> and <strong>import gasp</strong> to make sure that they are installed correctly.</li>
<li>Carry on with the great tutorial linked above!</li>
</ol>
</blockquote>
<p>I found it odd that the beginners tutorial left out all of this information. Hopefully this will save someone the two days that it took me to find all of these links, packages, and methods.</p>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/' rel='bookmark' title='The Golden Resource List for Python Beginners'>The Golden Resource List for Python Beginners</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/' rel='bookmark' title='The clarity of Python vs. the cloud of Perl'>The clarity of Python vs. the cloud of Perl</a></li>
<li><a href='http://www.koverholt.com/2011/07/how-to-compile-cfast-on-mac-os-x-and-linux/' rel='bookmark' title='How to compile CFAST on Mac OS X and Linux'>How to compile CFAST on Mac OS X and Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The clarity of Python vs. the cloud of Perl</title>
		<link>http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/</link>
		<comments>http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 17:57:55 +0000</pubDate>
		<dc:creator>koverholt</dc:creator>
				<category><![CDATA[FDS]]></category>
		<category><![CDATA[Goals]]></category>
		<category><![CDATA[Habits]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://koverholt.com/?p=184</guid>
		<description><![CDATA[I am learning the Python programming language right now, for many reasons. I need to hone in on a language so that I can write up a script in minutes to do pretty much anything that I need. Things ranging from text file processing, web CGI scripting to generate graphs from data, numerical analysis, and [...]
Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
<li><a href='http://www.koverholt.com/2008/03/updates-on-welcomed-unstability/' rel='bookmark' title='Updates on welcomed unstability'>Updates on welcomed unstability</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/' rel='bookmark' title='The Golden Resource List for Python Beginners'>The Golden Resource List for Python Beginners</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I am learning the Python programming language right now, for many reasons. I need to hone in on a language so that I can write up a script in minutes to do pretty much anything that I need. Things ranging from text file processing, web CGI scripting to generate graphs from data, numerical analysis, and so on. This leaves me with a large number of options such as C++, Java, MATLAB, Python, Perl, and others.</p>
<p>While I am not a programming newbie, my skill level sits somewhere in the moderate area as I have been exposed to many different programming languages at the beginner level. So when I look for programming tutorials, it leaves me somewhere between the beginner books and websites that assume that you barely know how to &#8220;download your camera to your PC&#8221; and the other side of the spectrum of which the tutorial looks about as exciting as a book of log tables:</p>
<p><img src="http://artfulscientist.files.wordpress.com/2008/03/logtables.jpg" alt="logTables" /><br />
(Flickr user <a href="http://flickr.com/photos/orqwith/2059820183/">quimby</a>)</p>
<p>That being said, that leaves us moderate programmers who want to learn &#8211; stuck at a good and bad part of our learning experience. The part where you need to practice about every day writing real-world scripts over and over and over. So, after many weeks of lagging through with Python and putting off script writing, I attacked my first real Python program. It seems really trivial and would probably be one of the first few homework problems assigned in a programming course &#8211; but I will document my learning process nonetheless for the other moderate programmers that are out there.</p>
<p>Why Python? I chose Python after dabbling in each language and reading way too much information on each one and finally just trying them out for myself. Which language would be able to match my high-level idealistic mind but still be practical enough to have some power and force behind it? Well, take a look at my example program below. I wanted a program that would take in values from a CSV (comma-separated value) file, loop through a template file, and output new text files with the data from the CSV file&#8217;s rows in each output file.</p>
<p align="center">For the more visually oriented:</p>
<p align="center"><img src="http://www.koverholt.com/wp-content/uploads/2008/03/pythonrep.png" alt="pythonrep.png" /></p>
<p>I actually had my roommate last summer help me out with a Perl version of this program, and for comparison, here it is:</p>
<pre class="brush: php; title: ; notranslate">#!/usr/bin/perl

if(@ARGV &amp;lt; 2)
{
print &quot;Usage: extractData &lt;csv&gt; &lt;template&gt;\n&quot;;
exit;
}&lt;/template&gt;&lt;/csv&gt;

my ($file, $templateFile) = @ARGV;
my $lastTest = &quot;&quot;;
my $templateString = `cat $templateFile`;
open DF, &quot;&amp;lt; $file&quot;;

while(&lt;df&gt;)
{
my $line = $_;
next unless($line =~ m/(^IT)|(^\,)/);
my ($test, undef, undef, $tray, undef, $cabletype) = split /\,/, $line;
$test = $lastTest if($test eq &quot;&quot;);
$test =~ s/IT//g;&lt;/df&gt;

$lastTest = $test;

print &quot;test: $test; tray: $tray.\n&quot;;

$test = sprintf(&quot;%02d&quot;, $test);

(my $toPrint = $templateString) =~ s/TEST/$test/g;
$toPrint =~ s/TRAY/$tray/g;
$toPrint =~ s/CABLETYPE/$cabletype/g;

my $outFile = &quot;CAROLFIRE_IT_&quot; . $test . &quot;_Tray_&quot; . $tray . &quot;.fds&quot;;

open OF, &quot;&amp;gt; $outFile&quot;;
print OF $toPrint;
close OF;
}

close DF;
</pre>
<p>Then, here is the version that I wrote last night using Python:</p>
<pre class="brush: python; title: ; notranslate">&quot;&quot;&quot;Module docstring.
Usage: python fdscsv.py &lt;csv&gt; &lt;template&gt; &lt;output&gt;
&quot;&quot;&quot;&lt;/output&gt;&lt;/template&gt;&lt;/csv&gt;

import csv, sys, os, re

arguments = sys.argv
input = csv.reader(open(arguments[1],&quot;r&quot;))
template = open(arguments[2], &quot;r&quot;)
lines = template.readlines()
counter = 1

for i, j, k in input:
output = open(arguments[3] + str(counter) + &quot;.fds&quot;, &quot;w&quot;)
for line in lines:
output.write(line.replace(&quot;IREP,JREP,KREP&quot;,(str(i) + &quot;,&quot; + str(j) + &quot;,&quot; + str(k))))
counter += 1
output.close()</pre>
<p>Now, I realize that the function of the scripts are slightly different while the primary CSV functionality that I illustrated above still remains. I am not going for a line-by-line comparison here. I do want you to just look over the code and see which one makes more sense to your mind. For me, the Python is so easy to read and almost natural to understand while the Perl takes some serious brainpower for me to decode.In conclusion, I just wanted to show where I am at in learning the Python language. It really is enjoyable at this point for me when compared to learning Perl, which was just painful for me. So I hope to add to the resounding praise of Python by posting these examples for other programmers who may be stuck in the intermediate phase of their learning and need a little push of motivation to continue on.</p>
<p>Finally, if you are interested in what the Python code is actually doing, here is my commented version. Thanks for reading.</p>
<pre class="brush: python; title: ; notranslate">&quot;&quot;&quot;Module docstring.
Usage: python fdscsv.py &lt;csv&gt; &lt;template&gt; &lt;output&gt;
&quot;&quot;&quot;&lt;/output&gt;&lt;/template&gt;&lt;/csv&gt;

import csv, sys, os, re

# Reads the arguments into a list
arguments = sys.argv

# Reads in the input csv file using the module csv
input = csv.reader(open(arguments[1],&quot;r&quot;))

# Reads in the template file
template = open(arguments[2], &quot;r&quot;)

# Splits the template file into lines
lines = template.readlines()

counter = 1

# Labels the columns for the data read from the csv and loops through the lines in the csv
for i, j, k in input:

# Opens a new file with the user-input name plus a counter and an fds extension
output = open(arguments[3] + str(counter) + &quot;.fds&quot;, &quot;w&quot;)

# Loops through each line in the template file
for line in lines:

# Replaces strings in the template file with numbers from the csv file
output.write(line.replace(&quot;IREP,JREP,KREP&quot;,(str(i) + &quot;,&quot; + str(j) + &quot;,&quot; + str(k))))

# Increments the counter for the filename
counter += 1

output.close()</pre>
<p>Related posts:<ol>
<li><a href='http://www.koverholt.com/2008/03/how-to-install-pyobjc-pygame-and-gasp-on-mac-os-x-for-python-tutorial/' rel='bookmark' title='How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial'>How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial</a></li>
<li><a href='http://www.koverholt.com/2008/03/updates-on-welcomed-unstability/' rel='bookmark' title='Updates on welcomed unstability'>Updates on welcomed unstability</a></li>
<li><a href='http://www.koverholt.com/2008/03/the-golden-resource-list-for-python-beginners/' rel='bookmark' title='The Golden Resource List for Python Beginners'>The Golden Resource List for Python Beginners</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.koverholt.com/2008/03/the-clarity-of-python-vs-the-cloud-of-perl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

