<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>An alien's viewpoint</title>
	<atom:link href="http://temporaryland.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://temporaryland.wordpress.com</link>
	<description>It is not about common sense</description>
	<lastBuildDate>Sun, 22 Jan 2012 05:06:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='temporaryland.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/1544dcf1944d3df77b483f4eb4454629?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>An alien's viewpoint</title>
		<link>http://temporaryland.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://temporaryland.wordpress.com/osd.xml" title="An alien&#039;s viewpoint" />
	<atom:link rel='hub' href='http://temporaryland.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2011 in review</title>
		<link>http://temporaryland.wordpress.com/2012/01/01/2011-in-review/</link>
		<comments>http://temporaryland.wordpress.com/2012/01/01/2011-in-review/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 01:23:12 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=631</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 49,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 18 sold-out performances for that many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=631&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<div style="background:url('/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg') no-repeat center center;height:300px;"></div>
<p>Here&#8217;s an excerpt:</p>
</p>
<blockquote><p>The concert hall at the Syndey Opera House holds 2,700 people.  This blog was viewed about <strong>49,000</strong> times in 2011.  If it were a concert at Sydney Opera House, it would take about 18 sold-out performances for that many people to see it.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/631/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=631&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2012/01/01/2011-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>
	</item>
		<item>
		<title>Giving OpenSuse 12.1 a shot</title>
		<link>http://temporaryland.wordpress.com/2011/12/05/giving-opensuse-12-1-a-shot/</link>
		<comments>http://temporaryland.wordpress.com/2011/12/05/giving-opensuse-12-1-a-shot/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 21:02:44 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=606</guid>
		<description><![CDATA[In our course through life, we all end up finding things that we enjoy and that we like to keep around. Linux and photography are two things that have added to my enjoyment for a long time. I remember when the first KDE was announced and the first time I actually tried it in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=606&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In our course through life, we all end up finding things that we enjoy and that we like to keep around.  Linux and photography are two things that have added to my enjoyment for a long time.  I remember when the first KDE was announced and the first time I actually tried it in a distribution called Mandrake (now known as Mandriva).  As for photography, I have enjoyed it since I was a little boy thanks to my parents old Yashica SLR.  I now use a digital SLR and like to get the most out my pictures.  So, when I read about some of the features in OpenSuse 12.1, I couldn&#8217;t resist giving it a try.  You can download it from <a href="http://software.opensuse.org/main/change_install?release=121&amp;lang=en&amp;medium=kde" title="Download OpenSuse 12.1" target="_blank">here</a>.  I decided to use the Live KDE version.</p>
<p><H2>Installation</H2></p>
<p>Installation was not complicated, and could have been easier if it wasn&#8217;t for the preexisting data partition that I wanted to preserve.  So, setting up the partitions the way I wanted took me a few minutes, but in the end it did exactly what I wanted.  Really, installation of a Linux system is so simple these days that I don&#8217;t think there is much that needs to be said about it.  Lets just move on.</p>
<p><H2>Configuration</H2></p>
<p>This part is interesting.  OpenSuse now allows you to set it up as a &#8220;Rolling Release&#8221;.  The advantage of a &#8220;Rolling Release&#8221; system is that you don&#8217;t just get system updates, but also system <strong>upgrades</strong>.  Of course, there are limits in how much can be upgraded this way, but a well implemented rolling release distribution can keep its users up to date, with the latest and greatest, for years, without the need of installing a new version of the OS.  This is very convenient and practical.  So, I decided to go ahead and do that for OpenSuse 12.1.</p>
<p>To set it up as a Rolling Release, you need to change the repositories that the OS uses to get its updates from. The instructions on how to do it are found in the <a href="http://en.opensuse.org/Portal:Tumbleweed" title="Tumbleweed Portal" target="_blank">Tumbleweed </a>portal of OpenSuse.</p>
<p>Once that is done, you may want to add <a href="http://en.opensuse.org/Additional_package_repositories" title="OpenSuse Additional Repositories" target="_blank">additional repositories</a>.  These repositories contain software that, for one reason or another, is not included in the base OpenSuse ones.  Note that there is a special pacman repository for those using the Tumbleweed setup.  However, the instructions for adding this repository did not work for me.  I know I must be doing something wrong.  This is what I entered in a terminal as root (it is all one line):</p>
<p><code>zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_Tumbleweed/Essentials</code></p>
<p>I finally got it added by reformatting the command as follows (again, it is all one line):</p>
<p><code>zypper ar -refresh http://packman.inode.at/suse/openSUSE_Tumbleweed/Essentials packman-essentials</code></p>
<p>To install Dropbox I temporarily enabled the &#8220;<a href="http://forums.opensuse.org/content/37-re-how-install-dropbox-kde.html" title="Adding Dropbox" target="_blank">contrib</a>&#8221; repository.</p>
<p>After that, I simply went into YAST and launched the Online Update to make sure I had the latest.</p>
<p><H2>KDE</H2></p>
<p>Of course, the main feature of OpenSuse 12.1 is KDE 4.7.2 itself.  If you have never used KDE, I certainly recommend that you do.  I don&#8217;t think there is any other desktop with the conveniences and polish that KDE offers.  Here is the way my desktop looks right now after I added an extra panel and a desktop widget for the weather (and oh yeah, I set one of my pictures as the wallpaper).<br />
<a href="http://temporaryland.files.wordpress.com/2011/12/mydesktop1.png" target="_blank"><img src="http://temporaryland.files.wordpress.com/2011/12/mydesktop_thmb.png?w=460&#038;h=287" alt="" title="My OpenSuse 12.1 Desktop" width="460" height="287" class="aligncenter size-full wp-image-609" /></a></p>
<p>I don&#8217;t want to turn this into a KDE review.  So I am just going to mention a few of the new things that I have noticed from this release.</p>
<p>For example, there is a new widget (I have placed it in the top panel) called &#8220;QuickAccess Browser&#8221; that is certainly handy.  You can see it in this screenshot.  It is the folder with the little star.<br />
<a href="http://temporaryland.files.wordpress.com/2011/12/quickaccess.png"><img src="http://temporaryland.files.wordpress.com/2011/12/quickaccess.png?w=460" alt="" title="QuickAccess Browser"   class="aligncenter size-full wp-image-615" /></a></p>
<p>It allows you to quickly get to a folder and launch a file or folder from it, complete with right mouse funtionality.  Nice and simple.  It seems so obvious after you use it that you wonder why no one else has done this before.  (If someone did I apologize for not noticing.)</p>
<p>Another small but very much appreciated new feature is the addition of a breadcrumbs feature to Kickoff the application launcher.  This makes it easier to navigate through your application menu.<br />
<a href="http://temporaryland.files.wordpress.com/2011/12/launcher.png"><img src="http://temporaryland.files.wordpress.com/2011/12/launcher.png?w=460&#038;h=222" alt="" title="Launcher Breadcrumbs" width="460" height="222" class="aligncenter size-full wp-image-614" /></a></p>
<p>But, for me, the absolute best feature of this release is the inclusion of digiKam 2.2.0.  It has many new features compared to the 1.9 version I have been using up to now.  For example, it now has face detection support, image versioning, new features related to metadata, new RAW decoding settings, and much much more.  I can&#8217;t wait to start exploring some of these.</p>
<p>And if that wasn&#8217;t enough, the guys at OpenSuse have configured and enabled color management throughout the system and in all the applications that support this.<br />
<a href="http://temporaryland.files.wordpress.com/2011/12/colormgmt.png"><img src="http://temporaryland.files.wordpress.com/2011/12/colormgmt.png?w=460&#038;h=287" alt="Color Management" title="Color Management" width="460" height="287" class="aligncenter size-full wp-image-612" /></a></p>
<p>This is a very important feature for photographers because it allows them to match the output of their printers to what they see in the screen.  Most people will probably not appreciate this feature much since most people never notice.  But, for serious photographers this feature is a must have.</p>
<p>So there you have it.  In spite of the economy and the political mess of the world, Linux keeps on advancing and improving.  One of those things in life that is good to have around.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/606/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=606&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/12/05/giving-opensuse-12-1-a-shot/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/12/mydesktop_thmb.png" medium="image">
			<media:title type="html">My OpenSuse 12.1 Desktop</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/12/quickaccess.png" medium="image">
			<media:title type="html">QuickAccess Browser</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/12/launcher.png" medium="image">
			<media:title type="html">Launcher Breadcrumbs</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/12/colormgmt.png" medium="image">
			<media:title type="html">Color Management</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux Mint 11 Saves the Day</title>
		<link>http://temporaryland.wordpress.com/2011/09/19/linux-mint-11-saves-the-day/</link>
		<comments>http://temporaryland.wordpress.com/2011/09/19/linux-mint-11-saves-the-day/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 13:52:14 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=595</guid>
		<description><![CDATA[A friend of mine brought me his computer for fixing, a Compaq Presario with XP Home. It was in a reboot loop. I told him about Linux, and all its advantages, and he agreed to try it. I grabbed my PCLinuxOS CD and installed it in a matter minutes. Everything was working, but something about [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=595&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A friend of mine brought me his computer for fixing, a Compaq Presario with XP Home. It was in a reboot loop. I told him about Linux, and all its advantages, and he agreed to try it. I grabbed my PCLinuxOS CD and installed it in a matter minutes. Everything was working, but something about that particular hardware was not sitting well with it. It kept freezing. This is the first time I see this, as all other machines I have installed it on have been very stable. My guess is that it has to do with the graphics. The machine has and old built-in Intel graphics adapter. I did not have a proper graphics card laying around to give him, so I figured I wouldn&#8217;t fight it.</p>
<p>I went online and downloaded Linux Mint 11 (Gnome). </p>
<p><a href="http://temporaryland.files.wordpress.com/2011/09/linuxmint11.png"><img src="http://temporaryland.files.wordpress.com/2011/09/linuxmint11.png?w=300&#038;h=187" alt="LinuxMint 11" title="LinuxMint 11" width="300" height="187" class="aligncenter size-medium wp-image-600" /></a></p>
<p>I was disappointed only by one thing, my Belkin USB wireless card would not connect to my network. A quick search online showed that several other people had the same problem and I could not find any with a working solution. I was in a hurry, so I just picked up the box and placed it next to the router in order to connect it with a network cable. Everything else was rather smooth. </p>
<p>I like the look of Mint. I certainly give it props on the looks department. The &#8220;Software Manager&#8221; is well designed and newbie friendly. </p>
<p><a href="http://temporaryland.files.wordpress.com/2011/09/mint11-software-manager.png"><img src="http://temporaryland.files.wordpress.com/2011/09/mint11-software-manager.png?w=300&#038;h=245" alt="LinuxMint 11 Software Manager" title="LinuxMint 11 Software Manager" width="300" height="245" class="aligncenter size-medium wp-image-601" /></a></p>
<p>I was a bit disconcerted by the fact that all users have permissions to access other users home areas. But, since it was not for me, I left it alone.</p>
<p>I didn&#8217;t get a chance to test it thoroughly, but it seems to be a very nice distro. (I&#8217;ll try to play with it a bit more latter.) PCLinuxOS handles my Belkin USB wireless completely out of the box. So, it is too bad that Mint didn&#8217;t. But it is too bad that PCLOS had such trouble with that particular hardware. I didn&#8217;t spend the time needed to get to the bottom of it. But, I guess the lesson is that if one distro is giving you trouble, go ahead and try a different one. Use what works. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/595/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=595&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/09/19/linux-mint-11-saves-the-day/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/09/linuxmint11.png?w=300" medium="image">
			<media:title type="html">LinuxMint 11</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/09/mint11-software-manager.png?w=300" medium="image">
			<media:title type="html">LinuxMint 11 Software Manager</media:title>
		</media:content>
	</item>
		<item>
		<title>LibreOffice 3.4.1 Table Borders Problem</title>
		<link>http://temporaryland.wordpress.com/2011/07/14/libreoffice-3-4-1-problem/</link>
		<comments>http://temporaryland.wordpress.com/2011/07/14/libreoffice-3-4-1-problem/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 15:19:07 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=577</guid>
		<description><![CDATA[This is just a quick post about a problem I am seeing in LibreOffice 3.4.1, but that some people tell me they are not seeing. I made a very simple odt document with a simple table using LibreOffice 3.3.3 for Windows. This is how it looks: You can download the actual document here Test1. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=577&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post about a problem I am seeing in LibreOffice 3.4.1, but that some people tell me they are not seeing.</p>
<p>I made a very simple odt document with a simple table using LibreOffice 3.3.3 for Windows.  This is how it looks:</p>
<div id="attachment_578" class="wp-caption aligncenter" style="width: 310px"><a href="http://temporaryland.files.wordpress.com/2011/07/test1.png"><img src="http://temporaryland.files.wordpress.com/2011/07/test1.png?w=300&#038;h=120" alt="LibreOffice 3.3.3 Table" title="LibreOffice 3.3.3 Table" width="300" height="120" class="size-medium wp-image-578" /></a><p class="wp-caption-text">LibreOffice 3.3.3 Table</p></div>
<p>You can download the actual document here <a href='http://temporaryland.files.wordpress.com/2011/07/test1.odt'>Test1</a>.</p>
<p>I then opened the file with LibreOffice 3.4.1 for Windows.  The results were that the table formatting changed, enough to make it a problem.  This is how it looks:</p>
<div id="attachment_581" class="wp-caption aligncenter" style="width: 310px"><a href="http://temporaryland.files.wordpress.com/2011/07/test1b.png"><img src="http://temporaryland.files.wordpress.com/2011/07/test1b.png?w=300&#038;h=120" alt="LibreOffice 3.4.1 table formating problem" title="LibreOffice 3.4.1 table formating problem" width="300" height="120" class="size-medium wp-image-581" /></a><p class="wp-caption-text">LibreOffice 3.4.1 table formating problem</p></div>
<p>Again, you can download the actual document <a href='http://temporaryland.files.wordpress.com/2011/07/test1b.odt'>LibreOffice 3.4.1 Document</a>.</p>
<p>Finally, this is how the file looks when you open it back on LibreOffice 3.3 after having been saved by 3.4.1:<br />
<div id="attachment_591" class="wp-caption aligncenter" style="width: 310px"><a href="http://temporaryland.files.wordpress.com/2011/07/test1c.png"><img src="http://temporaryland.files.wordpress.com/2011/07/test1c.png?w=300&#038;h=115" alt="Document in 3.3 after saved in 3.4.1" title="Document in 3.3 after saved in 3.4.1" width="300" height="115" class="size-medium wp-image-591" /></a><p class="wp-caption-text">Document in 3.3 after saved in 3.4.1</p></div></p>
<p>This has been submitted as a bug here:</p>
<p><a href="https://bugs.freedesktop.org/show_bug.cgi?id=39227">https://bugs.freedesktop.org/show_bug.cgi?id=39227</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/577/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=577&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/07/14/libreoffice-3-4-1-problem/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/07/test1.png?w=300" medium="image">
			<media:title type="html">LibreOffice 3.3.3 Table</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/07/test1b.png?w=300" medium="image">
			<media:title type="html">LibreOffice 3.4.1 table formating problem</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/07/test1c.png?w=300" medium="image">
			<media:title type="html">Document in 3.3 after saved in 3.4.1</media:title>
		</media:content>
	</item>
		<item>
		<title>I have been banned.</title>
		<link>http://temporaryland.wordpress.com/2011/03/25/i-have-been-banned/</link>
		<comments>http://temporaryland.wordpress.com/2011/03/25/i-have-been-banned/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 14:11:30 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=542</guid>
		<description><![CDATA[I have been banned from the PCLinuxOS forums. Yeah, I am rather shocked. But, I shall be the first to admit that I deserved it. I broke the rules of the forum, I spoke about religion. My bad. I shouldn&#8217;t have. It was a moment of weakness. You see, it is hard not to respond [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=542&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been banned from the PCLinuxOS forums.  Yeah, I am rather shocked.  But, I shall be the first to admit that I deserved it.  I broke the rules of the forum,  I spoke about religion.  My bad.  I shouldn&#8217;t have.  It was a moment of weakness.</p>
<p>You see, it is hard not to respond to statements that one strongly disagrees with.  In this case, someone wrote a post talking about &#8220;Understanding Evolution&#8221;.  While that post purported to speak about the evolution of the PCLinuxOS forum, it also made reference to the idea of Biological Evolution and provided a link to a website dedicated to the propagation of the idea that Biological Evolution is a fact.</p>
<p>In my mid twenties I started to question the beliefs that were handed to me by my parents and the society I grew up around. Among those beliefs was the theory of Evolution.  After reading a few books on the subject, I came to the conclusion that Evolution is a myth based on circumstantial evidence and a biased religious belief.</p>
<p>According to <a href="http://en.wikipedia.org/wiki/Circumstantial_evidence">Wikipedia</a>:</p>
<blockquote><p>Circumstantial evidence is evidence in which an inference is required to connect it to a conclusion of fact. By contrast, direct evidence supports the truth of an assertion directly—i.e., without need for any additional evidence or the intervening inference.</p></blockquote>
<p>The fossil record is comprised in its entirety of evidence that fits that description.  That same article states: &#8220;An explanation involving circumstantial evidence becomes more valid as proof of a fact when the alternative explanations have been ruled out&#8221;.  Since evolutionists feel justified in ruling out alternative explanations as &#8220;impossible&#8221;, they now want everyone to treat the idea of evolution as a fact.</p>
<p>While it is true that Earth species are tremendously adaptable, it is a stretch to conclude that adaptability can actually lead to new species being formed.  No one has been able to observe this and there is no direct evidence of this in the fossil record.</p>
<p>“Instead of finding the gradual unfolding of life,” says evolutionary paleontologist David M. Raup, “what geologists of Darwin’s time, and geologists of the present day actually find is a highly uneven or jerky record; that is, species appear in the sequence very suddenly, show little or no change during their existence in the record, then abruptly go out of the record.” (Field Museum of Natural History Bulletin, “Conflicts Between Darwin and Paleontology,” by David M. Raup, January 1979, p. 23.)</p>
<p>In recent years, scientists have been able to compare the genetic codes of dozens of different single-celled organisms as well as those of plants and animals. They assumed that such comparisons would confirm the branching “tree of life” proposed by Darwin. However, this has not been the case.  What has the research uncovered? In 1999 biologist Malcolm S. Gordon wrote: “Life appears to have had many origins. The base of the universal tree of life appears not to have been a single root.” Is there evidence that all the major branches of life are connected to a single trunk, as Darwin believed? Gordon continues: “The traditional version of the theory of common descent apparently does not apply to kingdoms as presently recognized. It probably does not apply to many, if not all, phyla, and possibly also not to many classes within the phyla.” (See: Biology and Philosophy, “The Concept of Monophyly: A Speculative Essay,” by Malcolm S. Gordon, 1999, p. 335.)</p>
<p>Recent research continues to contradict Darwin’s theory of common descent and to agree with the findings of Gordon. For example, in 2009 an article in New Scientist magazine quoted evolutionary scientist Eric Bapteste as saying: “We have no evidence at all that the tree of life is a reality.”  The same article quotes evolutionary biologist Michael Rose as saying: “The tree of life is being politely buried, we all know that. What’s less accepted is that our whole fundamental view of biology needs to change.” </p>
<p>Many scientists point to the fossil record as support for the idea that life emerged from a common origin. They argue, for example, that the fossil record documents the notion that fish became amphibians and reptiles became mammals. What, though, does the fossil evidence really show? </p>
<p>In reality, the vast majority of fossils show stability among types of creatures over extensive amounts of time. The evidence does not show them evolving from one type into another. Unique body parts appear suddenly. New features appear suddenly. For example, bats with sonar and echolocation systems appear with no obvious link to a more primitive ancestor.</p>
<p>Regardless, I do recognize that the PCLinuxOS forum is not the place to discuss these type of issues.  I regret having done so.  I deserve to be banned and banished to the land of the ignominious.  However, I find it sad that a bias exists and that posts supporting the Evolution myth are allowed to stand.  If posts expressing skepticism about Evolution are going to be removed, shouldn&#8217;t fairness dictate that those supporting it be removed as well.  Otherwise what we have is a <a href="http://en.wikipedia.org/wiki/One-sided_argument">one sided argument</a>.</p>
<p>Any way, for any one interested in seeing what happened, I saved the thread as a series of PDF documents (please excuse the formatting).</p>
<p>After the first post, a few comments that followed were deleted, admittedly on both sides of the issue.  This is what ensued afterwards.</p>
<p><a href='http://temporaryland.files.wordpress.com/2011/03/2011-03-23-pclos-forum.pdf' target="New">The start of the argument</a></p>
<p>Latter on, someone posted a link to a YouTube video making fun of the idea of an intelligent creator.  The post was allowed to stand for several hours.  I was surprised about this, and to be honest, a little upset about what I perceived to be unfairness.  So, I posted a response.  You can see the discussion here:</p>
<p><a href='http://temporaryland.files.wordpress.com/2011/03/2011-03-24-pclos-posts.pdf' target="New">Argument escalates.</a></p>
<p>This morning I woke up to find out that I have been banned from the PCLinuxOS forum.  Wow!  And to top it off, I find that only the posts that fit with the moderator&#8217;s view point have been allowed to remain?  Well, what can I say.  Bias is a hard thing to detect in one self.  This is the way the last page looks today.</p>
<p><a href='http://temporaryland.files.wordpress.com/2011/03/2011-03-25-pclos-forum.pdf' target="New">The remains</a></p>
<p>As Jason David BeDuhn states in his book, <a href="http://www.amazon.com/Truth-Translation-Accuracy-Translations-Testament/dp/0761825568">Truth in Translation</a> (p.10), &#8220;Bias is not the same as maliciousness or dishonesty.  Biases are unconscious assumptions or unrecognized blind spots.&#8221;  This I am afraid is what we have here.  Or I should say, I hope that is all this is.</p>
<p>As you can see from this blog, and from my PCLinuxOS post history, I avoid getting into religious arguments with people over the internet.  On occasion, when I run into comments that I see as clearly false (really that happens on the internet sometimes <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) I have fallen into the temptation of responding.  I have to work on that, I guess.  But, for this time, I just couldn&#8217;t help myself.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/542/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=542&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/03/25/i-have-been-banned/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>
	</item>
		<item>
		<title>Python for Newbies &#8211; Part2</title>
		<link>http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/</link>
		<comments>http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 17:45:15 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=505</guid>
		<description><![CDATA[This is part two of the Python for Newbies tutorial. Part 1 can be found here. Functions Functions are simply a set of commands or statements grouped together as a unit with a name that can be called on by other parts of the program (or even by other programs) to accomplish a certain task. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=505&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is part two of the Python for Newbies tutorial.  Part 1 can be found <a href="http://temporaryland.wordpress.com/2011/01/26/python-for-newbies/">here</a>.</p>
<p><a name="Functions"><br />
<h1>Functions</h1>
<p></a></p>
<p>Functions are simply a set of commands or statements grouped together as a unit with a name that can be called on by other parts of the program (or even by other programs) to accomplish a certain task. Since the statements inside a function do not have to be rewritten every time the steps they perform are needed, our programs are smaller and easier to maintain. We have already used several functions that are built in to the Python core. For example, we have used the <font face="courier">del</font> function to delete items from Python lists and dictionaries, the tuple function to convert a string into a tuple, several math functions, and others. However, we are now going to learn how to create our own functions. Functions are simple, but there are a few new associated concepts that you will have to understand.</p>
<p><a name="Defining a function"><br />
<h2>Defining a function</h2>
<p></a></p>
<p>Here is a brief example that we can examine:</p>
<p><code>&gt;&gt;&gt; def average(num1, num2):<br />
...     avrg = (num1 + num2) / 2<br />
...     return avrg<br />
</code></p>
<p>This is a small little function that calculates the average between two numbers and returns the result Notice that, as all the compound statements that we have seen, a function definition has a header that ends with a colon. The header begins with the def statement, followed by the name of the function to be. After that, we have something that you should be able to recognize, a tuple, nothing else, nothing more. That tuple is used to contain the parameters of your function. What are parameters? Well, parameters are values that can be passed to your function (and that your function will expect when called) for it to do something with them. In Python, those parameters can be anything you want: a number, a string, a list, a dictionary, a file, etc. Parameters can have default values too. For example, we could define a function with a header like this:</p>
<p><code>def personal_info(name, phone, country = 'USA'):</code></p>
<p>The third parameter of this function has a default value, the string ‘USA’. That means that when calling this function the third parameter is optional. We could call the function like this:</p>
<p><code>personal_info(Joe, 1234-5678)</code></p>
<p>The function would accept the call and use ‘USA’ as the value for the third parameter. Of course, we would also have the option of using a different third parameter, like this:</p>
<p><code>personal_info(Bob, 987-6543, 'UK')</code></p>
<p>So, defaults can come in very handy.</p>
<p>Notice that on the first function we defined above (average) the result was returned to the calling program with a specific statement, the return statement. Why is that? Why couldn’t we just be satisfied with having the variable <font face="courier">avrg</font> as the container of the result and use it in other parts of the program? In one word: namespaces.</p>
<p><a name="Namespaces and Scope"><br />
<h2>Namespaces and Scope</h2>
<p></a></p>
<p>Python, as most programming languages, stores names defined inside a function in a separate place from where it stores other names. This different spaces are called, appropriately so, namespaces or scopes. You can think of namespaces as Dictionaries that contain names and its values as key-value pairs. Whenever a function is defined an associated namespace is created. For reasons beyond the scope of this tutorial (pun intended), in Python, names are only accessible to your code if they are defined in one of the following four scopes:</p>
<ul>
<li>The first one is called the Built-in scope. This scope is where all the core functions and constants of Python are defined. It is always available to you from anywhere in your code.</li>
<li>The second one is the Global scope. This is the namespace at the top level of a Python module. (You can see the Modules section if you want, or, for now, think of a module as a file with Python code.) In other words, any name defined outside a function or a class (we will cover classes latter as well) is in the Global scope. Names defined in this scope, like those in the built-in scope, are always available from anywhere in the module that contains it.</li>
<li>The third one is the local namespace. This is where names defined in a function reside. As mentioned before, names defined inside a function are only accessible from within that function. They are automatically destroyed once the function stops running.</li>
<li>The last namespace is called the nested scope. This namespace is defined as the namespace of the enclosing scope in which it was defined. That is, if inside a function you make reference to a name that Python does not find in the local namespace, it will then look to see if the name is defined in the enclosing namespace – the nested namespace.</li>
</ul>
<p>Here is an example of how the nested namespace would work:</p>
<p><code>&gt;&gt;&gt; operation = 1     # Variable defined in the Global namespace. Always accessible.<br />
&gt;&gt;&gt; def some_function(operation, num1, num2):<br />
…     if operation == 1:<br />
…         x=num1     #Variables defined in some_function’s local namespace.<br />
…         y=num2<br />
…         def multiply():<br />
…             print x * y      # x and y are not in the local namespace of multiply.<br />
…         multiply()</code></p>
<p>Without nested scopes, this function would report an error, because x and y would not be in the local namespace of multiply, or in the global namespace, or in the built-in namespace. Of course, one could pass the value of x and y as parameters to the multiply function, but certain styles of programming (most specifically functional style programming) are much happier with access to nested scopes. (In other words you may never need to use nested scopes, but at least you now know they are there).</p>
<p>Since variable assignment inside a function takes place in the local namespace, one cannot reassign (change) the value of a Global variable inside a function. Let’s look at an example.</p>
<p><code>&gt;&gt;&gt; value= 1<br />
&gt;&gt;&gt; def change_value():<br />
…     value = 2<br />
…     print value<br />
…<br />
&gt;&gt;&gt; change_value()<br />
2<br />
&gt;&gt;&gt; print value<br />
1</code></p>
<p>As you can see, when we assigned 2 as the value of value inside the change_value function, the assignment took place only in the local namespace of the function. The Global variable value remained unchanged. There is, however, a dirty little workaround that should probably be avoided as much as possible in truly efficient and well designed code. Some claim that global variables should only be changed by direct assignment at the global level, whether through direct assignment, or by the value returned from a function. (For example: <font face="courier">value=change_value())</font> In any case the workaround is the use of the global statement. Let’s try it.</p>
<p><code>&gt;&gt;&gt; var = 1<br />
&gt;&gt;&gt; def func(val):<br />
…     global var<br />
…     var =val*2<br />
…<br />
&gt;&gt;&gt; func(3)   <br />
&gt;&gt;&gt; print var   <br />
6</code></p>
<p>So, thanks to the use of the global statement, our function successfully changed the value of a variable defined in the Global namespace. If var did not exist before the function call, the function would simply create it.</p>
<p>To clarify the scope order, know that Python will look for names according the LNGB rule. It will first look for the name definition in the local namespace, if not found, it will then look for it in the nested scope, then in the global scope, and finally in the built-in scope. If not found, it will return an error.</p>
<p><a name="Modules"><br />
<h1>Modules</h1>
<p></a></p>
<p>We mentioned modules in the previous section. Basically, Python modules are files with Python code. Modules are the natural way to group related code. So far, all of the built-in Python functions we have seen are included as part of the core Python functionality. However, there are a lot more functions and capabilities included in a Python distribution. Most of them are included as separate modules that one has to “import” in order to use. Let’s look at an example:</p>
<p><code>&gt;&gt;&gt; import os<br />
&gt;&gt;&gt; os.getcwd()<br />
'/home/me'</code></p>
<p>The first line, above, uses the import statement to gain access to all the classes, functions and variables defined in a module called <font face="courier">os</font>. (As you can imagine the <font face="courier">os</font> module contains code related to the use of the operating system.) Notice that to access the <font face="courier">getcwd</font> function (get current working directory), all we had to do was type the name of the module, add a period, and type the name of the function. Let’s look at another function in this module:</p>
<p><code>&gt;&gt;&gt; os.chdir('/home/me/MyDocs')<br />
&gt;&gt;&gt; os.getcwd()<br />
'/home/me/MyDocs'</code></p>
<p>Here we used the <font face="courier">chdir</font> function to change our current working directory to <font face="courier">‘/home/me/MyDocs’</font>. There are a couple of things to pay attention to here. First, notice that the chdir function expects a string as a parameter. That is why we used quotes to surround the path. Notice too that we used a forward slash rather that the backslash commonly used in windows. The reason for this is that in Python the backslash is a character with a special meaning – it is the ‘escape’ character. Besides, in Linux, the OS of the N900, the forward slash is the standard path separator. (If you want your code to be portable between your N900 and Windows use <font face="courier">os.sep</font> instead of /.)</p>
<p>To remove a module that we have imported we again can use the handy del function:</p>
<p><code>&gt;&gt;&gt; del(os)</code></p>
<p>We could also import one or more specific items from a module. This is how we would do that:</p>
<p><code>&gt;&gt;&gt; from os import listdir, getcwd<br />
&gt;&gt;&gt; listdir(getcwd())<br />
['somefile.txt', 'Dir', 'Dir2', 'File', 'File.txt']</code></p>
<p>The <font face="courier">listdir</font> function is imported directly into the local scope. This means that we can use it directly without reference to the module it was originally in. This can be convenient sometimes, but is not considered a ‘best practice’ way of doing things. Nevertheless, there are some modules designed specifically to be imported into the local space. For example some Graphical User Interface (GUI) related modules are like that.<br />
Here is another example, one we made reference to earlier.</p>
<p><code>&gt;&gt;&gt; from __future__ import division<br />
&gt;&gt;&gt; 7/2<br />
3.5</code></p>
<p>That allows you to use the new division functionality of Python 3.x within Python 2.7 (it also works with Python 2.6).</p>
<p>There are dozens of modules included in a Python distribution. This collection of modules is called Python’s Standard Library. It is a very good idea to become familiar with their names and what they are for, at least it is good to know what are the most commonly used ones. Probably the best way to do this is by looking at the documentation that is installed with Python. In particular, looking at the “Global Module Index” can be very useful. It contains links to detail explanations for each module of the Standard Python Library. There are also lots of third party developed modules and packages, such as the Windows extension modules that give access to all the win32 API, and to several Windows specific features. Others are the PyQt package and the PyGTK packages. These are the packages used for building GUI interfaces. One more that I recommend you look at is the py2exe package. This one allows you to distribute your Python programs as executable files to users that do not have Python installed.</p>
<p>Naturally, we can make our own modules simply by creating a file with Python code in it. When we import that module, all its code is executed, whether it is code that defines a function, or simple Python expressions. For example add the following commands into a regular text file, and name the file test.py:</p>
<p><code>def greet(name):<br />
    print "Hello there, %s" %(name)<br />
greet('John')</code></p>
<p>Now, in the Python interpreter, import your test module. Note that, since your module is likely not in the Python path, you may have to change your current working directory to the folder where you saved test.py so that Python can find it (The Python path is where Python searches, in addition to the current working directory, when trying to import a module.):</p>
<p><code>&gt;&gt;&gt; import test<br />
Hello there, John</code></p>
<p>Two things happened when we imported our module: The greet function was defined, and the greet(&#8216;John&#8217;) function call executed. Now, we can continue to use the greet function with other function calls. For example:</p>
<p><code>&gt;&gt;&gt; test.greet('Marla')<br />
Hello there, Marla<br />
&gt;&gt;&gt; test.greet('Michael')<br />
Hello there, Michael</code></p>
<p>Now, open a Terminal session and go to the directory that contains your module. Then, try running test.py as a script. For example:</p>
<p><code>/home/m/MyDocs/Test&gt; python test.py<br />
Hello there, John</code></p>
<p>The same two things happened. But, of course, since Python terminates when it is finished running the script, we can not continue using it to call the greet function.<br />
We can also make our scripts accept command line parameters so that it uses them at run time. For example, save this as test.py:</p>
<p><code>import sys<br />
    for item in sys.argv:<br />
        print item</code></p>
<p>We could then run this script with a call like this:</p>
<p><code>/home/m/MyDocs/Test&gt;python test.py First "Second" "And third"<br />
test.py<br />
First<br />
Second<br />
And third</code></p>
<p>The parameters we give to our scripts when calling them are stored in a list called <font face="courier">argv</font> accessible through the sys module. The first parameter (<font face="courier">argv[0]</font>) is the name of the script itself. So, in our example above, <font face="courier">argv[1]</font> would be the parameter <font face="courier">First</font>.</p>
<p>Generally, the conceptual purpose of a module is to store variables, function definitions and classes for use in other Python programs when needed. But, as you can see, there is no real difference between a module and a regular Python script. You can import any of your Python programs as a module and you can then use the functions and classes defined in them on any program where you need them. However, there is a right way to organize your code inside a module for this to be effective. To illustrate this, lets take a look at another sample Python file, lets call it unames.py.</p>
<p><code>import sys<br />
def full_name(first, second):<br />
    full = first + " " + second<br />
    return full<br />
def greet(name):<br />
    print "Hello there, %s" %(name)<br />
fname = full_name(sys.argv[1], sys.argv[2])<br />
greet(fname)</code></p>
<p>What we have here is a couple of function definitions, a function call that results in variable assignment, and another function call. Now, say that you are creating a new program and want to use those two functions. You could simply import <font face="courier">unames</font> and access them. However, you would then have a new <font face="courier">fname</font> variable and the <font face="courier">greet(fname)</font> function call executed, and that may not be what you want. So, in order to make sure our Python modules are reusable, we need to have a way of keeping our function and class definitions separate from the calls and we need to have a way of avoiding those calls from executing when the module is imported. Fortunately, there is a very easy way to do this. Just reorganize the code like this:</p>
<p><code>def full_name(first, second):<br />
    full = first + " " + second<br />
    return full<br />
def greet(name):<br />
    print "Hello there, %s" %(name)<br />
if __name__ =='__main__':<br />
    import sys<br />
    fname = full_name(sys.argv[1], sys.argv[2])<br />
    greet(fname)</code></p>
<p>Notice that the import statement and the two function calls are only executed when a special condition is met – that the file is being run as a script. This allows you to place all your function and class definitions at the top of your modules and at the very end you can place any code that is to run when the file is run as a script, and that is not to run when the file is simply imported as a module.</p>
<p>One last thing to remember about modules is that if you are using a module and make changes to the code while you are using them in an interactive Python session, you will only be able to use the changes if you reload the module. To do this you have to either delete the module from Python’s memory (using the <font face="courier">del</font> function) and import it again, or use the reload function like this:</p>
<p><code>&gt;&gt;&gt; reload(test)</code></p>
<p>Now that we are talking about files, why don’t we take a look at how we work with files from Python code.</p>
<p><a name="Working with files"><br />
<h1>Working with files</h1>
<p></a></p>
<p>Working with files implies being able to open, read, and write files. Python has everything needed to do that and be able to process them with ease. In Python, files are a built in object type (like lists, dictionaries, etc). We create file objects using the open function. Depending on how we do this, we can either open an existing file or create a new one. Let’s first create a new file:</p>
<p><code>&gt;&gt;&gt; f = open('MyFile.txt', 'w')</code></p>
<p>At this point the variable f represents a new file object that has been created in the file system at the current working directory. Notice that the open function expects two parameters. The first parameter is the path and file name, provided as a string. The second parameter is also a string. It can be either &#8216;w&#8217;, for write, or &#8216;r&#8217;, for read. Let’s now write something into our file:</p>
<p><code>&gt;&gt;&gt; f.write('This is a line inside the file.\nThis is another line.\n')<br />
&gt;&gt;&gt; f.write('This is the third line.')<br />
&gt;&gt;&gt; f.close()</code></p>
<p>Now, if with a text editor we take a look at the file we created, the file should look like this:</p>
<p><code>This is a line inside the file.<br />
This is another line.<br />
This is the third line.</code></p>
<p>As you have probably figured out already, the &#8216;\n&#8217; combination represents the ‘new line’ character. The write method of the file object allows us to add strings to our files. And the close method simply closes it. Easy, right? Now what if you wanted to change something in the file we just created? Well, here is an example:</p>
<p><code>&gt;&gt;&gt; f = open('MyFile.txt', 'r')<br />
&gt;&gt;&gt; file_contents = f.readlines()     #The readlines method returns a list of lines.<br />
&gt;&gt;&gt; f.close()<br />
&gt;&gt;&gt; file_contents     #Just to show you the contents of file_contents.<br />
['This is a line inside the file.12', 'This is another line.12', 'This is the third line.']<br />
&gt;&gt;&gt; f = open('MyFile.txt', 'w')     #Now we open it again to write our changes.<br />
&gt;&gt;&gt; for line in file_contents:<br />
...     new_line = line.replace("line", "set of words")<br />
...     f.write(new_line)<br />
...<br />
&gt;&gt;&gt; f.close()</code></p>
<p>As you can see, to edit a file we first have to read its contents, close the file, and open it again to write. If we open an existing file with write mode, we really are just over-writing it with a new blank file of the same name. So, after executing the commands above, we have a new file, in the same location, with the same name, and almost the same contents. The only difference is that we replaced the occurrences of “line” with “set of words”.</p>
<p>Those are the basics of file manipulation, and that is all we are going to cover. Now, through this tutorial you may have notice that we referred several times to something called classes and objects. Let’s take a very brief look at this subject.</p>
<p><a name="Classes and Objects"><br />
<h1>Classes and Objects</h1>
<p></a></p>
<p>There are several theories of what is the best way to program. One method of programming is called Object Oriented Programming (OOP). Python was designed from the ground up, with OOP concepts in mind. Yet, Python doesn’t force us to program this way. OOP in Python is optional. Still, it may be a good thing to give you a glimpse of how this works.</p>
<p>We have already seen how we can save statements variables and functions inside a module, and then access them in our code by importing the module. Another way to do this is by using the class statement. Let’s look at an example:</p>
<p><code>&gt;&gt;&gt; class Address:<br />
...     def setStreet(self, value):<br />
...         self.Street = value<br />
...     def setCity(self, value):<br />
...         self.City = value<br />
...     def display(self):<br />
...         print "The address is:"<br />
...         print self.Street<br />
...         print self.City</code></p>
<p>As you can see we have defined the class Address. In it we have defined three methods (method is how a function inside a class is generally called). You probably notice that the first parameter for each of the methods is the word “self”. Why? Well, to understand that, you have to understand what classes are for. A class is defined so that we can produce objects based on them. You can think of the class definition as the DNA of its objects. We can create as many objects as we want from a class, and they will all be like little clones of each other. Each object we create is referred to as an instance object. Once an instance is created, it can start to have its own particular characteristics, different values, etc. Each object is now an independent ’self’. So, the self we use when defining the methods inside a class refer to the particular instance the actions we are defining should apply to. If this is “all too wonderful” for you, don’t worry. Just remember that you have to use self as the first parameter of your method definitions. If you don’t, Python will kindly remind you with an error message when you try to use the method.</p>
<p>Let’s now create an instance (object) from our class:</p>
<p><code>&gt;&gt;&gt; address = Address()</code></p>
<p>That is all there is to it. At this point address is an instance object based on the clsAddress class. It can now start accepting its own personal data. Let’s give it some now:</p>
<p><code>&gt;&gt;&gt; address.setStreet('157 Royal Road')<br />
&gt;&gt;&gt; address.setCity('NY')</code></p>
<p>Notice that we have access to the methods defined in our class. Let’s display the contents of our object now:</p>
<p><code>&gt;&gt;&gt; address.display()<br />
The address is:<br />
157 Royal Road<br />
NY</code></p>
<p>You may remember, from our earlier analysis of scopes, that functions have their own local scope. Variables inside a function are destroyed as soon as the function stops running. The same is true of methods (since they are simply functions too). That is why when assigning a value to a variable inside a method, if we want it to be available latter, we qualify the variable with, again, the word self. This is as if we told Python to store the value of the variable in the global scope of our object. That’s right, objects have their own internal global namespaces. The value of variables defined this way can be retrieved by making direct reference to the particular object namespace like this:</p>
<p><code>&gt;&gt;&gt; address.Street<br />
'157 Royal Road'<br />
&gt;&gt;&gt; address.City<br />
'NY'</code></p>
<p>Of course, we have been using this feature all along in this tutorial, but now you should have a better idea of why. Here is another way to look at the contents of an object:</p>
<p><code>&gt;&gt;&gt; dir(address)<br />
['Street', 'City']</code></p>
<p>The <font face="courier">dir</font> function returns a list of all the names defined in the object. Finally, here is another little trick to help inspect objects:</p>
<p><code>&gt;&gt;&gt; address.__dict__<br />
{'Street':'157 Royal Road', 'City':'NY'}</code></p>
<p>Every object has to have a built-in location to store its instance names and values. That place is the <font face="courier">__dict__</font> dictionary. And, yes, it is just a regular dictionary object itself.</p>
<p>So, just remember, in Python, everything is an object. Even class definitions are objects:</p>
<p><code>&gt;&gt;&gt; Address.__dict__<br />
{'display': , 'setStreet': , '__doc__': None, 'setCity': , '__module__': '__main__'}</code></p>
<p>There is much more we could talk about in this subject, but this is all we are going to cover. Time is precious, and we still have a few more things to cover. For example, in this section we made reference to the fact that Python has the capacity of displaying errors. Errors are simply unavoidable in programming. So, let’s take a quick look at them now.</p>
<p><a name="Errors and Error Handling"><br />
<h1>Errors and Error Handling</h1>
<p></a></p>
<p>What we commonly refer to as ‘errors’ in programming are the accidental mistakes we make in our code that yield either the wrong result, or no result at all. Some programming languages leave it at that. They make no attempt at trying to explain why the program did not do what you expected. That is why people have developed special programs called ‘debuggers’ to provide some help in finding where those errors occur. Thankfully, Python is very helpful in this regard. When you commit an error in programming that would result in a break of the flow of execution, Python displays messages to help you try to identify the type and location of the error. For example:</p>
<p><code>&gt;&gt;&gt; print something<br />
Traceback (most recent call last):<br />
File "", line 1, in ?<br />
NameError: There is no variable named 'something'</code></p>
<p>The error message, in this case, consists of three lines:</p>
<ol>
<li>The first line simply tells you the way the error message is organized (most recent call last). This is because some errors occur, for example, when your program makes a function call, that itself calls another function, that calls another certain function (where the error resides). Python will trace back the error, letting you know what the original call was, what the next call was, and what the final call (where the error occurred) was. </li>
<li>The second line tells you the file and line number of where the error was found. In this case, since we are using the Interactive Command Prompt, it refers to the file as stdin (standard input – right now, the keyboard input). </li>
<li>Finally, the last line tells us the type of error (<font face="courier">NameError</font>), and what the error was.</li>
</ol>
<p>So, as you can see, it is very easy to track down your errors, most of the time. Of course, if the error in your program is found in its logic, rather than in its semantics, there is very little Python can do to help you. There are some other packages designed for that. For example, there is a module called unittest that allows one to do something called “Unit Testing”. This is a very popular way to check for errors in Python programming. But, that is beyond the scope of this tutorial.</p>
<p>The errors that Python catches and displays, as we saw above, are really a subcategory of the larger category called exceptions. Some of the most common standard exceptions in Python are the following (there is a complete list in the manual):</p>
<table>
<tr>
<td><b>Error Type</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>IOError</td>
<td>Generated when an I/O operation fails.</td>
</tr>
<tr>
<td>ImportError</td>
<td>Generated when a module import fails.</td>
</tr>
<tr>
<td>IndexError</td>
<td>Generated when an attempt is made to access a non-existent element index.</td>
</tr>
<tr>
<td>KeyError</td>
<td>Generated when an attempt is made to access a non-existent dictionary key.</td>
</tr>
<tr>
<td>MemoryError</td>
<td>Generated when an out-of-memory error occurs.</td>
</tr>
<tr>
<td>NameError</td>
<td>Generated when an attempt is made to access a non-existent variable.</td>
</tr>
<tr>
<td>SyntaxError</td>
<td>Generated when the interpreter finds a syntax error.</td>
</tr>
<tr>
<td>TypeError</td>
<td>Generated when an attempt is made to run an operation on an incompatible object type.</td>
</tr>
<tr>
<td>ValueError</td>
<td>Generated when function receives an argument that has an inappropriate value.</td>
</tr>
<tr>
<td>ZeroDivisionError</td>
<td>Generated when an attempt is made to divide by zero.</td>
</tr>
</table>
<p>In Python exceptions can be intercepted quite easily. The way this is done is by the try/except/else construct. For example:</p>
<p><code>&gt;&gt;&gt; try:<br />
...     print something<br />
... except NameError:<br />
...     print "You should have defined it first!"<br />
...<br />
You should have defined it first!</code></p>
<p>As you can see, we were able to trap the error and tell Python what to do about it. We could exit the program at this time, but in this case we just printed a message. The flow of execution would continue outside of the try statement.</p>
<p>When we add an else block to a try construct, the code inside the else block is executed only if no exception is generated by the try construct. Here is an example:</p>
<p><code>&gt;&gt;&gt; try:<br />
...     numb1 = int(raw_input("Type a number"))<br />
... except ValueError:<br />
...     print "You should have typed a number."<br />
... else:<br />
...     print "Good job %i is a number." %(numb1)</code></p>
<p>The first line in the try statement tries to convert the input from the raw_input function into an integer number. It will only work if the input received is in the form of a number. Anything else will generate a ValueError, which we can dutifully intercept. If no error is found the else block is executed and the flow of the program continues outside the try statement.</p>
<p>A variation of the previous statement is the try/finally statement (no else allowed on this one). It consists of one try block followed by a finally block. The finally block always executes no matter what happens. So, this construct is useful when there is something that you want to make sure happens before the program exits. For example, you may want to make sure that some files are closed, or that some data is saved. If an exception is raised during the execution of the try statement, the flow of execution jumps to the finally block, and then it is returned the normal exception handling mechanism. For example, if we had something like this:</p>
<p><code>try:<br />
    try:<br />
        &lt;statements&gt;<br />
    finally:<br />
        &lt;statements&gt;<br />
except:<br />
    &lt;statements&gt;<br />
    </code></p>
<p>In this example, if an exception is found in the try/finally statement, once the finally block is executed, the exception would be propagated to the try/except statement for it to be handled. If not trapped by the except statement, it would be propagated further up until it finally is handled by the Python’s standard exception handling mechanism, thus ending the program.</p>
<p>There is a lot more we could learn about errors or exceptions, but this at least gives you a glimpse into the basics. Let’s now try to gather a few miscellaneous tidbits that will be useful to you as write your own programs.</p>
<p><a name="Other common built-in functions"><br />
<h1>Other common built-in functions</h1>
<p></a></p>
<p>In this section we are going to cover a few functions that we did not cover before. These are some of the most commonly used built-in functions from the Python core.</p>
<p><b>Note:</b><br />
To see a list of all the built-in functions in the Python core use this command: <font face="courier">dir(__builtins__)</font></p>
<p>Let’s first look at the <font face="courier">len</font> function. Its purpose is to tell us the length of a sequence. In other words, how many items are in it. This is how it works:</p>
<p><code>&gt;&gt;&gt; L = [1, 2, 3, 4]<br />
&gt;&gt;&gt; len(L)<br />
4</code></p>
<p>So, as you can imagine, the <font face="courier">len</font> function is very useful when dealing with sequences. For example, we could use it like this in a script:</p>
<p><code>#Script to process a Social Security Number<br />
ssn = ""<br />
while not ssn:     #Empty strings evaluate to false.<br />
    ssn = raw_input("Enter your Social Security Number: ")<br />
    ssn = ssn.replace("-", "") #Eliminate the dashes, if present.<br />
    if len(ssn) != 9:     #Checks the number of digits.<br />
        print "This is an invalid number."<br />
        print "Try again please."<br />
        ssn = ""     #Set ssn to false<br />
print "Your Social Security Number is: " + ssn</code></p>
<p>On this example, we created a while loop that continues to loop until a Social Security Number of nine digits is entered.</p>
<p>Another common function is the <font face="courier">range</font> function. This function is used to create a list of successively higher numbers. It’s most common use is in conjunction with for loops, allowing us to repeat a block of statements a certain number of times. It can take up to three parameters. Here is what it does:</p>
<p><code>&gt;&gt;&gt; range(5)     #One parameter, returns list of numbers from 0 to n-1.<br />
[0, 1, 2, 3, 4]<br />
&gt;&gt;&gt; range(2, 5)     #First parameter is lower bound.<br />
[2, 3, 4]<br />
&gt;&gt;&gt; range(0, 10, 2)     #Third parameter provides a step.<br />
[0, 2, 4, 6, 8]<br />
</code></p>
<p>To use this in a for loop you can do something like:</p>
<p><code>def doit():<br />
    print "Done it."<br />
num=int(raw_input("How many times do you want to do this? "))<br />
for i in range(num):<br />
    doit()</code></p>
<p>This little script will simply execute the <font face="courier">doit</font> function however many times the user requests. So, if we execute it from the command line, it will look something like:</p>
<p><code>/home/me/MyDocs&gt; python test.py<br />
How many times do you want to do this? 4<br />
Done it.<br />
Done it.<br />
Done it.<br />
Done it.</code></p>
<p>As we have seen already there are times in which Python will complain if a certain input it receives is not of the correct type. For example, the range function accepts only integers as input. The raw_input function returns its input as a string, that is why we use the int function to try to convert its output into an integer.</p>
<p>The last function we are going to look at is the type function. All it does is return the type of its input. For example:</p>
<p><code>&gt;&gt;&gt; type(5)</p>
<p>&gt;&gt;&gt; type('5')<br />
</code></p>
<p>So we could use it, for example when we want to make sure that a certain object we are about to do something to is of the correct type. For example, let’s say that we wanted to write a function that displays the methods available to a certain object. Let’s first create a class with one variable and one method:</p>
<p><code>&gt;&gt;&gt; class Obj:<br />
...     def __init__(self):     #This is a special method that runs when instances are created.<br />
...         self.data = 1     #In this case it just initializes a variable to 1<br />
...     def add(self, num):     #This is a method that will be available to our instances.<br />
...          self.data = self.data + num</code></p>
<p>Now, let’s create an instance object based on this class:</p>
<p><code>&gt;&gt;&gt; ob = Obj()<br />
&gt;&gt;&gt; ob.data<br />
1<br />
&gt;&gt;&gt; ob.add(2)<br />
&gt;&gt;&gt; ob.data<br />
3<br />
&gt;&gt;&gt; dir(ob)<br />
['data']<br />
&gt;&gt;&gt; ob.__dict__<br />
{'data': 3}</code></p>
<p>As you can see, objects that we create ourselves, as opposed to the built-in objects, do not automatically display the methods they have at their disposal. (There is a not so hard way to make them do that, but we are not going to get into that.) So, now let’s create a function that lets us know what methods are available to our homemade objects.</p>
<p><code>import types<br />
def find_methods(instance):<br />
    clss = instance.__class__   #We find the class object of the instance<br />
    methods = []<br />
    for name in dir(clss):     #Get the named items from the class object<br />
        attribute = clss.__dict__[name] #Get the value of items from the __dict__<br />
        if type(attribute) == types.FunctionType:     #is it a function<br />
            methods.append(attribute)<br />
    return methods</code></p>
<p>Now, we can use this function to find the methods in our little object:</p>
<p><code>&gt;&gt;&gt; find_methods(ob)<br />
[ , ]</code></p>
<p><b>Note:</b><br />
In Python, classes can inherit methods and variables from one or more classes too. This is called multiple inheritance. Our function would have to be a little different to be able to read functions inherited from other classes.  But, as we said before, time is precious. So, why don’t we finish this part of the tutorial looking at the time module.</p>
<p><a name="Time"><br />
<h1>Time</h1>
<p></a></p>
<p>Computers perform time calculations in reference to an “epoch” (like a pivot date). In the Unix family of operating systems the “epoch” is January 1, 1970, 0 hours, 0 seconds, UTC. Python follows that same method of handling time. The time module has several functions that we can use to handle time related tasks. In its most basic form, Python expresses the current time as the number of seconds since the “epoch”. Here is how you do it:</p>
<p><code>&gt;&gt;&gt; import time<br />
&gt;&gt;&gt; time.time()<br />
1006015080.406</code></p>
<p>Not very easy to read. However, other functions allow us to manipulate this output with ease. For example the <font face="courier">localtime</font> function.</p>
<p><code>&gt;&gt;&gt; time.localtime(time.time())<br />
(2001, 11, 17, 11, 40, 37, 5, 321, 0)</code></p>
<p>The localtime function returns a tuple representing: Year, month, day, hour, minute, second, weekday (0-6), Julian day (1-366), and the daylight savings time flag (-1 (force disable), 0 (default), or 1 (force enable)). There are also many other functions in this module that you should become familiar with. But, even with just this two functions we can do something useful. Let’s create a little timer class that we can use to check the time when a certain event in a program takes place and to time how long it takes our program to do its tasks. (Remember that you have to include an import time statement somewhere for this to work).</p>
<p><code>class Timer:<br />
    def __init__(self):<br />
        self.start_time = time.time()<br />
    def cur_time(self):<br />
        now = time.time()<br />
        tt=time.localtime(now)<br />
        if tt[3] &gt; 12:<br />
            hr = int(tt[3]) - 12<br />
            ampm = 'p.m.'<br />
        else:<br />
            hr = int(tt[3])<br />
            ampm = 'a.m.'<br />
        ct = "%s:%s:%s %s %s/%s/%s" %(str(hr), tt[4], tt[5], ampm, tt[1], tt[2], tt[0])<br />
        return ct<br />
    def elapsed(self):<br />
        now = time.time()<br />
        minutes =(now - self.start_time) / 60<br />
        secs = (now - self.start_time) % 60     #The remainder of the division<br />
        return 'Elapsed: %s min %s sec' % (int(minutes), int(secs))</code></p>
<p>If we save that into a file called timer.py we can then import it into any of our programs. Let’s import it into the Python Command Line to play with it a little.</p>
<p><code>&gt;&gt;&gt; import timer<br />
&gt;&gt;&gt; mytimer = timer.Timer()</code></p>
<p>As soon as the instance is created it records the time in the start_time variable. We can verify that like this:</p>
<p><code>&gt;&gt;&gt; mytimer.start_time<br />
1006016982.671</code></p>
<p>Now let’s check the current time.</p>
<p><code>&gt;&gt;&gt; mytimer.cur_time()<br />
'12:10:49 a.m. 11/17/2001'</code></p>
<p>And finally, check how much time has elapsed since the instance was created.</p>
<p><code>&gt;&gt;&gt; mytimer.elapsed()<br />
'Elapsed: 1 min 38 sec'</code></p>
<p>Well, that is it for this section. It didn’t take too much time now did it?</p>
<p>We are going to wrap up this part of the tutorial here. The remaining parts of the tutorial will be quite interesting. Hopefully it won’t be too long before they are completed. Come back and check in a little while. And remember that if you would like to contribute your help to this tutorial you are very welcome.  Happy coding to all.</p>
<p><a name="About this tutorial"><br />
<h1>About this tutorial</h1>
<p></a><br />
I learned Python from a few different sources.  I picked up quite a bit from several online books and tutorials, such as <a href="http://www.greenteapress.com/thinkpython/thinkpython.html">this one</a>. However, neither of the online tutorials felt easy enough for me.  Most of them felt like they were made by geniuses for geniuses.  I wanted something that expressed the concepts more simply and more logically, without making me do intellectual gymnastics to get there.  Fortunately, I found that the book <a href="http://oreilly.com/catalog/9780596002817">Learning Python</a>, by Mark Lutz, was exactly what I was looking for, and finally got me over the learning hump.</p>
<p>I first created this tutorial in 2001 while volunteering at a non-profit organization.  It was originally meant to encourage the use of Python within that organization.  I tried to condense the ideas and the logic found in the &#8220;Learning Python&#8221; book and make them even more simple.  The book <a href="http://oreilly.com/catalog/9780596002817">Learning Python</a> is a lot more comprehensive and I definitely recommend it to any one seriously interested in getting into Python.  This tutorial is good for those that want to ease into Python or into programing in general.</p>
<p>The version of Python and other libraries targeted by the tutorial will be initially 2.7.  Python 3.0 has several changes in the language that make it incompatible with this tutorial.  I hope to incorporate those changes into this tutorial some time in the future.  Some sections of this tutorial, specifically the GUI portions, have not yet been finished.</p>
<p>This tutorial is made available to you under the Creative Commons Attribution-Share Alike 3.0 license:</p>
<p><a href="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0/</a><br />
<a href="http://creativecommons.org/licenses/by-sa/3.0/legalcode">http://creativecommons.org/licenses/by-sa/3.0/legalcode</a></p>
<p>Joe Crawford has been working on an expanded version of this tutorial.  I haven&#8217;t had a chance to review it, but you may want to take a look at it.  It can be found here:</p>
<p><a href="http://www.teaching3d.com/w/?page_id=188">http://www.teaching3d.com/w/?page_id=188</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=505&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>
	</item>
		<item>
		<title>Python for Newbies &#8211; Part1</title>
		<link>http://temporaryland.wordpress.com/2011/01/26/python-for-newbies/</link>
		<comments>http://temporaryland.wordpress.com/2011/01/26/python-for-newbies/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 19:37:07 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=476</guid>
		<description><![CDATA[&#160; Table of Contents What is Python? Why Python? Installing Python How Python works The building blocks of a Python program Variables Expressions Numbers Strings Lists Tuples Dictionaries How to program in Python &#8220;for&#8221; loops &#8220;truth&#8221; tests &#8220;while&#8221; loops &#8220;if&#8221; statements Functions Defining a function Namespaces and Scope Modules Working with files Classes and Objects [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=476&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<h1>Table of Contents</h1>
<ul>
<li><a href="#What is Python?">What is Python?</a></li>
<li><a href="#Why Python?">Why Python?</a></li>
<li><a href="#Installing Python">Installing Python</a></li>
<li><a href="#How Python works">How Python works</a></li>
<li><a href="#The building blocks of a Python program">The building blocks of a Python program</a>
<ul>
<li><a href="#Variables">Variables</a></li>
<li><a href="#Expressions">Expressions</a></li>
<li><a href="#Numbers">Numbers</a></li>
<li><a href="#Strings">Strings</a></li>
<li><a href="#Lists">Lists</a></li>
<li><a href="#Tuples">Tuples</a></li>
<li><a href="#Dictionaries">Dictionaries</a></li>
</ul>
</li>
<li><a href="#How to program in Python">How to program in Python</a>
<ul>
<li><a href="#for loops">&#8220;for&#8221; loops</a></li>
<li><a href="#truth tests">&#8220;truth&#8221; tests</a></li>
<li><a href="#while loops">&#8220;while&#8221; loops</a></li>
<li><a href="#if statements">&#8220;if&#8221; statements</a></li>
</ul>
</li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Functions">Functions</a>
<ul>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Defining a function">Defining a function</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Namespaces and Scope">Namespaces and Scope</a></li>
</ul>
</li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Modules">Modules</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Working with files">Working with files</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Classes and Objects">Classes and Objects</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Errors and Error Handling">Errors and Error Handling</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Other common built-in functions">Other common built-in functions</a></li>
<li><a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/#Time">Time</a></li>
<li>GUI &#8211; Qt development</li>
<li>GUI &#8211; GTK development</li>
<li>Maemo/Meego specific modules</li>
<li><a href="#About this tutorial">About this tutorial</a></li>
</ul>
<p><a name="What is Python?"><br />
<h1>What is Python?</h1>
<p></a></p>
<p>Python is a computer programming language created initially by Guido Van Rossum, who released it to the world as an “Open Source” “Free”program. It has since then been progressively improved by the contributions of hundreds of computer programmers around the world. The Python package can be downloaded gratis from the internet for every major computing platform in existence. It can be used and even modified for just about any purpose.</p>
<p><a name="Why Python?"><br />
<h1>Why Python?</h1>
<p></a></p>
<p>There are many computer programming languages in existence. They all have different advantages and disadvantages. The brain of a computer is its processor. No processor understands English. The processor needs to receive input in a format that it understands. Most processors are made to understand commands formatted as a series of zeros “0” and ones “1”. This format is called binary. It is possible to write programs by hand using this format of zeros and ones, but it is very difficult, time consuming, and error prone. That is why computer programming languages have been invented.<br />
Programming languages are frequently categorized as “low level” or “high level”. Low level languages were the first ones to appear. They simplified the process of writing instructions to the computer by allowing the use of normal words to be used in writing the program. A translator program, a “compiler”, translates the program’s instructions into a binary file that can then be understood by the processor. However, low level programming languages are still quite difficult to master. They force the programmer to understand the way the computer works internally. The programmer has to give instructions for every step that the computer must take to handle a certain task, which can easily lead to errors and serious problems. On the other hand, low level programs tend to be quite fast and efficient (if done correctly).<br />
High level languages are designed to make it easier to program on. The instructions look more like normal language. And, a lot of the details are handled by the compiler. This makes for much shorter development time, but can also mean that the program is not as fast and efficient as a program would be if done in a lower level programming language.<br />
Python is a very high level programming language. Many consider it the easiest programming language to learn and to program on. Many common tasks that would normally have to be programmed by the programmer are already built in to the language. Python is very useful as an easy and quick way to program anything from small little scripts to large scale client/server systems. This is especially true with today’s ultra fast computers that make up for the speed disadvantage inherent to high level programming languages. Programmers tend to like Python because of its clean and logical syntax, which shortens development cycles tremendously. It also forces programmers to use code indentation correctly. At first, some programmers see this as a challenge and unnecessary restriction. However, not long after beginning to use it, most programmers realize that it is easy to adjust to it and that it results in very clean code which is easily maintained (even if the code was written by someone else).</p>
<p><a name="Installing Python"><br />
<h1>Installing Python</h1>
<p></a></p>
<p>If you are using Linux, Python should already be installed, most likely with the right version for this tutorial. On Windows, just go to <a href="http://www.python.org/download/" target="New">www.python.org/download/</a> and get yourself a download of Python 2.7, not the latest 3.x, since Python 3.x code is not compatible with this tutorial. (It is really not too different, but different enough to break things.)  On Windows, I also recommend that you get the Windows extensions package, by Mark Hammond (get the latest build of the one that matches your version of Python).  Other useful packages are the <a href="http://www.pythonware.com/products/pil/">Python Image Library</a>, and <a href="http://www.py2exe.org/">py2exe</a> (for creating standalone Python executables).</p>
<p><a name="How Python works"><br />
<h1>How Python works</h1>
<p></a></p>
<p>Python programs run with the aid of an “interpreter”. The interpreter is a program that converts the code into the binary instructions needed by the processor, at run time. There is an interpreter for each different platform where Python runs. This allows Python code written in a Windows machine, to run unchanged, in a Linux machine, a Macintosh machine, or even a smart phone. Of course, Python also has a lot of “platform specific” features that are optimized for the platform for which they are written. (Avoid these if you don’t want to tie your program down to a specific platform.) The interpreter must, either be installed on the computer that needs to run the Python program, or the Python program must be packaged in conjunction with the interpreter so that it can be run by computers without Python.</p>
<p>The interpreter can be run directly in what is called the “Interactive Command Line”. Python commands can be typed directly into this session and they are processed immediately showing the results of the command. This unique feature allows for quick and easy testing of ideas and code.</p>
<p>Most Python programs, however, are written with some type of text editor, saved as plain text files with a .py extension, and run as an independent process. Since there is no need to “compile” a Python program before running it, a programmer can test its changes to the code immediately after saving them.</p>
<p><a name="The building blocks of a Python program"><br />
<h1>The building blocks of a Python program</h1>
<p></a></p>
<p>First of all, what is a “program”? Well, at its most simplest form, a program can be defined as one or more instructions given to a computer for processing.  Normally, those instructions are saved or recorded in some way before passing them on to the computer.   In Python, however, as we said above, we can also hand those instruction to the computer directly, interactively.</p>
<p>Lets enter Python’s interactive mode by opening the Terminal application (or Command Prompt) and enter the following command:</p>
<p><code>python</code></p>
<p>Now, let’s do our first program as it is traditionally done:</p>
<p><code>&gt;&gt;&gt; print "Hello World"<br />
Hello World</code></p>
<p>Here, the word <font face="courier">print</font> is a built in command or “statement” that sends the given argument to the screen. The second part of the program, what follows the print statement, is the argument itself, in this case, the string <font face="courier">&quot;Hello World&quot;</font>. The quote marks tell Python to treat the words inside of them as a string, rather than as a command or a variable. (A “string” is a sequence of characters, like a word, a sentence, etc. They are further explained latter in this section.)</p>
<p><b>Note:</b><br />
Typically, in Python manuals and tutorials, when showing python code entered in an interactive session the <font face="courier">&gt;&gt;&gt;</font> represents the Python Command Line prompt. When a compound statement is being defined (one that takes more than one line), Python switches to … as a prompt.</p>
<p><b>Note:</b><br />
Text typed after a <font face="courier">#</font> is referred to as a comment, and is ignored by the Python interpreter.</p>
<p><a name="Variables"><br />
<h2>Variables</h2>
<p></a></p>
<p>What is a variable? Put simply, you can think of a variable as a name (a word) that refers to a certain value. We can use almost any word and assign a value to it. For example:</p>
<p><code>&gt;&gt;&gt; hi = "Hello World"</code></p>
<p>The word <font face="courier">hi</font> is now the name of a variable who’s value is the string <font face="courier">&quot;Hello World&quot;</font>. Let’s use the print statement to send the value of hi to the screen:</p>
<p><code>&gt;&gt;&gt; print hi<br />
Hello World</code></p>
<p>In Python, variables are very flexible. You don’t have to declare them first, like in other languages. You can assign any value to them, even if they already have a value of a different type. For example, let’s change the value of <font face="courier">hi</font> to <font face="courier">3.0</font>:</p>
<p><code>&gt;&gt;&gt; hi = 3.0<br />
&gt;&gt;&gt; print hi<br />
3.0</code></p>
<p>We can also assign a variable as the value of a variable. For example:</p>
<p><code>&gt;&gt;&gt; num = hi<br />
&gt;&gt;&gt; print num<br />
3.0</code></p>
<p>Another neat feature of Python’s interactive shell is that you don’t even have to use the print statement to see the values of variables and other objects. You can simply type their name and Python will display it.</p>
<p><code>&gt;&gt;&gt; num<br />
3.0</code></p>
<p><a name="Expressions"><br />
<h2>Expressions</h2>
<p></a></p>
<p>At the interactive command prompt one can type expressions and see their result interactively.  &#8220;An expression is a combination of variables, operators and values that represents a single result value&#8221;<a href="http://openbookproject.net/thinkcs/python/english2e/ch02.html">*</a>. For example:</p>
<p><code>&gt;&gt;&gt; num + 2<br />
5.0<br />
&gt;&gt;&gt; ((5 – 1) + num) * 2<br />
14.0</code></p>
<p>We can assign the value of an expression to a variable. Such as:</p>
<p><code>&gt;&gt;&gt; numb = ((5 – 1) + num) * 2<br />
&gt;&gt;&gt; numb<br />
14.0</code></p>
<p><a name="Numbers"><br />
<h2>Numbers</h2>
<p></a></p>
<p>Notice on this last example that the number returned by Python is a number with a decimal point. In computer terminology this is called a floating point number. Since the expression included a floating point number (3.0), the expression’s value was automatically converted into a floating point number. The reason for the distinction in number types is beyond the scope of this tutorial. In most computer programming languages, one has to be careful to use the right type of number for each application. In Python, it is good to know that there are different types of numbers, but Python will usually deal with the details quite well. The only caveat to currently watch out for is division. Notice this:</p>
<p><code>&gt;&gt;&gt; 7 / 2<br />
3</code></p>
<p>Since both numbers in the division are integers (a type of number without decimal places) Python performs an integer division. This may not be what someone new to programming expects. Currently, to work around this one can do things like this:</p>
<p><code>&gt;&gt;&gt; 7.0 / 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# or float(7) / 2<br />
3.5</code></p>
<p>In more recent versions of Python (version 3.x), Python’s designers have decided to change the way this works so that it does what new users would expect. With the 2.7 version of Python one can already import this behavior from the &#8220;__future__&#8221; module. We will see more about ‘importing’ latter.</p>
<p>Some common operators associated with numbers are:</p>
<table>
<tr>
<td><b>Operator</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>+</td>
<td>Addition</td>
</tr>
<tr>
<td>-</td>
<td>Subtraction</td>
</tr>
<tr>
<td>*</td>
<td>Multiplication</td>
</tr>
<tr>
<td>/</td>
<td>Division</td>
</tr>
<tr>
<td>%</td>
<td>Remainder (e.g. 9%2=1; 8%2=0)</td>
</tr>
<tr>
<td>**</td>
<td>Power (4**2=16)</td>
</tr>
</table>
<p>There are also many math functions in Python for doing just about any operation needed. Here is a small sample (see the documentation for more). To access them you need to first import them from the math module, like this for example:</p>
<p><code>from math import acos</code></p>
<table>
<tr>
<td><b>Function</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td>acos(x)</td>
<td>Return the arc cosine of x</td>
</tr>
<tr>
<td>cos(x)</td>
<td>Return the cosine of x</td>
</tr>
<tr>
<td>log(x)</td>
<td>Return the natural logarithm of x</td>
</tr>
<tr>
<td>sqrt(x)</td>
<td>Return the square root of x</td>
</tr>
<tr>
<td>tanh(x)</td>
<td>Return the hyperbolic tangent of x</td>
</tr>
</table>
<p>A handy tip is that in the Interactive Command Prompt you can recall the last printed expression with the underscore character “_”. So for example, you can use Python as a handy calculator this way:</p>
<p><code>&gt;&gt;&gt; 2 + 2<br />
4<br />
&gt;&gt;&gt; _ + 6<br />
10</code></p>
<p>There is also a special Python extension called Numerical Python (NumPy) which allows it to become a tool for higher math functions such as linear algebra and matrices. But, enough of numbers for now.</p>
<p><a name="Strings"><br />
<h2>Strings</h2>
<p></a></p>
<p>We already saw an example of a string in the “Hello World” example. “A string is an ordered collection of characters, used to store and represent text-based information”. Python strings can be enclosed in double, single, or even triple (for multi-line strings) quotes. For example:</p>
<p><code>&gt;&gt;&gt; 'Hello World'<br />
'Hello World'<br />
&gt;&gt;&gt; "Hello 'Hello World'"<br />
"Hello 'Hello World'"<br />
&gt;&gt;&gt; '''This is a longer string that spans<br />
… several lines, doesn’t say anything<br />
… meaningful, and ends here'''</code></p>
<p>The fact that strings are “ordered” means that we can access their components by position. Each character in a string has an index position before it. For example the string “Python” has the following indexes:</p>
<p><a href="http://temporaryland.files.wordpress.com/2011/01/python_indexes.jpg"><img src="http://temporaryland.files.wordpress.com/2011/01/python_indexes.jpg?w=300&#038;h=58" alt="String Indexes" title="String Indexes" width="300" height="58" class="aligncenter size-medium wp-image-494" /></a></p>
<p>Notice that the first character “P” is located at index 0, as in programming languages like C, not 1 as in languages like Basic. However, unlike C, with Python you can also use negative indexes, which start counting from the end of the string.<br />
To get the characters located at certain indexes we can use their index number inside brackets. Let’s look at some examples.<br />
To get the character located at the beginning of the string we can use:</p>
<p><code>&gt;&gt;&gt; "Python"[0]<br />
'P'</code></p>
<p>Or if we are using a variable:</p>
<p><code>&gt;&gt;&gt; hw = "Hello World"<br />
&gt;&gt;&gt; hw[0]<br />
'H'<br />
&gt;&gt;&gt; hw[1]<br />
'e'<br />
&gt;&gt;&gt; hw[-1]<br />
'd'</code></p>
<p>We can also get “slices” of a string by specifying the first and last index of the slice separated by a colon.</p>
<p><code>&gt;&gt;&gt; hw[1:7]<br />
'ello W'<br />
&gt;&gt;&gt; hw[4:-2]<br />
‘o Wor’</code></p>
<p>The left or right bounds of the string can be specified in a slice by leaving the index blank. For example:</p>
<p><code>&gt;&gt;&gt; hw[:5]<br />
'Hello'<br />
&gt;&gt;&gt; hw[6:]<br />
'World'<br />
&gt;&gt;&gt; hw[:]<br />
'Hello World'</code></p>
<p>Strings are very smart “objects”. They know how to behave correctly in many situations such as:<br />
When adding a string to a string:</p>
<p><code>&gt;&gt;&gt; hw + " Today"<br />
'Hello World Today'<br />
&gt;&gt;&gt; hw[:5] + " You"<br />
'Hello You'</code></p>
<p>Multiplication:</p>
<p><code>&gt;&gt;&gt; hw[:6] * 5<br />
'Hello Hello Hello Hello Hello '</code></p>
<p>Notice that in all the operations we have done so far with strings, the operation returns a result but the original string remains unchanged. That is how strings work. A string is what is called an “immutable sequence”. What this means is that to change a string we actually have to create a new string. For example:<br />
Trying to change the value of a string character in place</p>
<p><code>&gt;&gt;&gt; hw[0] = "M"</code></p>
<p>This raises an error!</p>
<p>However, since variables are so flexible we can simply assign a new value to it:</p>
<p><code>&gt;&gt;&gt; hw= "M" + hw[1:]<br />
&gt;&gt;&gt; hw<br />
'Mello World'</code></p>
<p>This works because the <font face="courier">hw[1:]</font> expression is calculated first, then <font face="courier">&quot;M&quot;</font> is added to it, and finally the result is assigned as the value of the variable <font face="courier">hw</font>.<br />
Another way to join strings with variables is by means of string formatting. For example, what if you had a program that greets the user by name according to the time of day. For example, it could say something like: “Hi Joe. How are you this morning?”. In this case the program could gather the name of the user somehow and place it in a variable called “name”. It could also fetch the time of the day by looking at the computers clock, determine if it is morning, afternoon, or evening, and place the result in a variable called “time_of_day”. You could then have the following line in your program to merge them into a string:</p>
<p><code>&gt;&gt;&gt; Greeting = "Hi %s. How are you this %s" % (name, time_of_day)</code></p>
<p>Python replaces the occurrences <font face="courier">%s</font> with the respective variable in the tuple after the <font face="courier">%</font> character. (A “tuple” is a sequence of items inside a parentheses. Tuples are further explained latter in this tutorial.) Here is another example:</p>
<p><code>&gt;&gt;&gt; dessert = "Pecan Pie"<br />
&gt;&gt;&gt; max_per_person = 1<br />
&gt;&gt;&gt; answer = "The dessert of the day is %s. You can only take %i per person" % (dessert, max_per_person)<br />
&gt;&gt;&gt; answer<br />
"The dessert of the day is Pecan Pie. You can only take 1 per person"</code></p>
<p>In this example we added a string variable and an integer variable into the answer string. Strings and integers have different formatting codes (<font face="courier">%s, %i</font>). See Python’s documentation for other formatting codes.</p>
<p>Strings also have built-in methods such as the following:</p>
<p><code>&gt;&gt;&gt; "hello".capitalize()<br />
'Hello'<br />
&gt;&gt;&gt; "HELLO".lower()<br />
'hello'<br />
&gt;&gt;&gt; 'hello'.upper()<br />
'HELLO'<br />
&gt;&gt;&gt; 'Hello World'.replace(" ", "-")&nbsp;&nbsp;&nbsp;&nbsp;     #Replace occurrences of first parameter with second<br />
'Hello-World'<br />
&gt;&gt;&gt; ' Hello World '.lstrip()&nbsp;&nbsp;&nbsp;&nbsp;     #To strip the whitespace at the left of string<br />
'Hello World '<br />
&gt;&gt;&gt; ' Hello World '.rstrip()&nbsp;&nbsp;&nbsp;&nbsp;     #To strip the whitespace at the right of string<br />
' Hello World'<br />
&gt;&gt;&gt; ' Hello World '.strip()&nbsp;&nbsp;&nbsp;&nbsp;     #To strip the whitespace at the left and right<br />
'Hello World'<br />
&gt;&gt;&gt; "This is a longer string".split()<br />
['This', 'is', 'a', 'longer', 'string']</code></p>
<p>On the last example we see how the split method returns a list of strings. It separates the original string by some given delimiter. When none is given, the default, whitespace, is used. But, what is a list?</p>
<p><a name="Lists"><br />
<h2>Lists</h2>
<p></a></p>
<p>Like strings, lists are ordered sequences. So, they share many of the same functionality. However, lists are mutable sequences, that is we can change them in place. Also, unlike strings, lists can contain any type of object: numbers, strings, even other lists. Much of the simplicity, power, and popularity of Python comes from this built in object type.</p>
<p>To define a list, we simply have to enclose it in square brackets using commas as item delimiters:</p>
<p><code>&gt;&gt;&gt; L = [1, 2,'three', 4]</code></p>
<p>The <font face="courier">L</font> variable is now a list object. We can use indexes and slices to access its members:</p>
<p><code>&gt;&gt;&gt; L[0]<br />
'1'<br />
&gt;&gt;&gt; L[2:]<br />
['three', 4]</code></p>
<p>And, as mentioned before, we can change them in place:</p>
<p><code>&gt;&gt;&gt; L[2] = 3<br />
&gt;&gt;&gt; L<br />
[1, 2, 3, 4]<br />
&gt;&gt;&gt; L[0] = ['one', 'two', 'three']<br />
&gt;&gt;&gt; L<br />
[['one', 'two', 'three'], 2, 3, 4]</code></p>
<p>We can also concatenate lists (add them together):</p>
<p><code>&gt;&gt;&gt; L + [8, 9]<br />
[['one', 'two', 'three'], 2, 3, 4, 8, 9]</code></p>
<p>And repeat or multiply:</p>
<p><code>&gt;&gt;&gt; [1, 2, 3] * 3<br />
[1, 2, 3, 1, 2, 3, 1, 2, 3]</code></p>
<p>We can delete items from lists using the del function:</p>
<p><code>&gt;&gt;&gt; L = [['one', 'two', 'three'], 2, 3, 4]<br />
del L[1]<br />
L<br />
[['one', 'two', 'three'], 3, 4]</code></p>
<p>Or even:</p>
<p><code>del L[0][1]&nbsp;&nbsp;&nbsp;&nbsp;     #Deletes item at index 1 of L[0]<br />
L<br />
[['one', 'three'], 3, 4]</code></p>
<p>Lists can be sorted and reverse sorted:</p>
<p><code>&gt;&gt;&gt; L = ['c', 'b', 'a', 1]<br />
&gt;&gt;&gt; L.sort()<br />
&gt;&gt;&gt; L<br />
[1, 'a', 'b', 'c']<br />
&gt;&gt;&gt; L.reverse()<br />
&gt;&gt;&gt; L<br />
['c', 'b', 'a', 1]</code></p>
<p>Notice that the sort and reverse methods do not return a new sorted list as a result. They simply change the list in place and return a special value called None. To see the results of the sort we have to print the list.</p>
<p>Another little peculiarity to watch out for when using lists is the following:</p>
<p><code>&gt;&gt;&gt; L1 = [1, 2, 3]<br />
&gt;&gt;&gt; L2 = L1<br />
&gt;&gt;&gt; L2<br />
[1, 2, 3]<br />
&gt;&gt;&gt; L2[0] = 8<br />
&gt;&gt;&gt; L2<br />
[8, 2, 3]<br />
&gt;&gt;&gt; L1<br />
[8, 2, 3]</code></p>
<p>Notice that changing an item in L2 also changed it in L1. The reason for this is that when we assign L1 as the value of L2 what Python actually does is assign a pointer to L1 as the value of L2. In other words, they are linked. If this is not the desired result, you can avoid it by doing the following:</p>
<p><code>L2 = L1[:]</code></p>
<p>Because slices return new lists, assigning a slice of all the items of L1 as the value of L2 results in L2 being a new, independent list, a clone of L1.</p>
<p>So as you can see lists are very easy and friendly to use. In Python lists have a very close relative. Let’s take a look at it now.</p>
<p><a name="Tuples"><br />
<h2>Tuples</h2>
<p></a></p>
<p>Tuples are very similar to lists. The difference (and the reason for their existence) is that tuples are immutable. In other words, they can not be changed in place. Other than that everything we saw about lists also applies to tuples.</p>
<p>Tuples are defined by parentheses:</p>
<p><code>&gt;&gt;&gt; t = (1, 2, 3)<br />
&gt;&gt;&gt; t[1]<br />
2<br />
&gt;&gt;&gt; t[1:]<br />
(2, 3)</code></p>
<p>Earlier we saw that strings know how to convert themselves to lists using their ’split’ method. We can also convert a string into a tuple with a function called tuple. It works like this:</p>
<p><code>&gt;&gt;&gt; tuple('some string')<br />
('s', 'o', 'm', 'e', ' ', 's', 't', 'r', 'i', 'n', 'g')</code></p>
<p>You may wonder when will you ever use tuples, since lists do everything tuples can do and more. Well, among other reasons, since tuples are immutable, they are handy whenever you want to make sure that they do not accidentally get changed by some call. Some built in operations require tuples. And last but not least, tuples make for excellent dictionary keys.</p>
<p><a name="Dictionaries"><br />
<h2>Dictionaries</h2>
<p></a></p>
<p>Dictionaries allow us to collect all kinds of objects just as lists and tuples do. However, rather than fetching them back through the use of index or offset location, dictionaries allow us to fetch their items by keys. So, for each item in a dictionary, there is an accompanying key. Here is a dictionary example:</p>
<p><code>&gt;&gt;&gt; d = {'key1': 'dog', 2: 'cat', ('key', 'number', 'three'): 'mouse'}</code></p>
<p>As you can see, dictionaries are enclosed in curly brackets <font face="courier">‘{}’</font>, and each key-value pair is separated by a colon <font face="courier">‘:’</font>. Notice that we can use strings (<font face="courier">&#8216;key1&#8242;</font>), numbers (<font face="courier">2</font>), and tuples (<font face="courier">(&#8216;key&#8217;, &#8216;number&#8217;, &#8216;three&#8217;)</font>) as dictionary keys. All of these are immutable type objects. Values can be anything we want: strings, lists, …, and even other dictionaries, which contain other dictionaries, that contain other…. Like lists, dictionaries can be modified in place. However, they are not ordered sequences so, as we said before, we can not use indexes or slices to retrieve their items. It is important to remember that the order in which dictionary items appear is not to be relied upon. Nevertheless, Python offers very simple ways to work with dictionaries. Let’s look at some examples.</p>
<p>Retrieving a value:</p>
<p><code>&gt;&gt;&gt; d['key1']<br />
'dog'<br />
&gt;&gt;&gt; d[2]<br />
'cat'</code></p>
<p>Changing the value of a key:</p>
<p><code>&gt;&gt;&gt; d['key1'] = ['milk', 'cake']<br />
&gt;&gt;&gt; d<br />
{('key', 'number', 'three'): 'mouse', 2: 'cat', 'key1': ['milk', 'cake']}</code></p>
<p>Notice that on the last example the order of the dictionary items is printed differently than how we entered it. Now let’s add a new entry:</p>
<p><code>&gt;&gt;&gt; d['new'] = 1.5<br />
&gt;&gt;&gt; d<br />
{('key', 'number', 'three'): 'mouse', 2: 'cat', 'key1': ['milk', 'cake'], 'new': 1.5}</code></p>
<p>As with lists, to delete an item we can use the del function:</p>
<p><code>&gt;&gt;&gt; del(d[('key', 'number', 'three')])<br />
&gt;&gt;&gt; d<br />
{2: 'cat', 'key1': ['milk', 'cake'], 'new': 1.5}</code></p>
<p>Two very important operations that are frequently needed is the ability to retrieve all the keys or all the values contained in a dictionary. Python does this easily:</p>
<p><code>&gt;&gt;&gt; d.keys()<br />
[2, 'key1', 'new']<br />
&gt;&gt;&gt; d.values()<br />
['cat', ['milk', 'cake'], 1.5]</code></p>
<p>Notice that in both instances Python returns a list of the items we requested. This is handy because we can then use any of the functions and methods associated with lists, such as sort and reverse, to arrange them in the order that we want. We could then iterate through each item in the right order, in spite of the fact that dictionaries are unordered collections. You may now wonder, what is to iterate? This brings us to our next major subject.</p>
<p><a name="How to program in Python"><br />
<h1>How to program in Python</h1>
<p></a></p>
<p>In this section we are going to see how we can use the different data and object types that we have already covered, as well as a few others, to put together full scale programs.<br />
Up to now all we have done is review some of the main object types available in Python using quick little one line expressions that do a single operation. However, the real power of computer programming is its ability to have the computer do multiple things for us with one simple command on our part. The concept of iteration is a good example of this.<br />
Iteration is &#8220;the process of repeating a set of instructions a specified number of times or until a specific result is achieved&#8221;<a href="http://www.thefreedictionary.com/iteration">*</a>. For example if we had a list with five items and we wanted to print each one of them, we could manually type five lines of code that would print each item. But what if we did not know how many items the list contained at any particular time, or what if the list contained hundreds of items? Well, actually the solution is very simple. This is how we would do it in Python:</p>
<p><a name="for loops"><br />
<h2>“for” Loops</h2>
<p></a></p>
<p>As we have seen already, lists can be of any length we desire. Lets see what we can do with a little list of 5 items.</p>
<p><code>&gt;&gt;&gt; L = [1, 2, 3, 4, 5]<br />
&gt;&gt;&gt; for i in L:<br />
…     print i<br />
1<br />
2<br />
3<br />
4<br />
5</code></p>
<p>What we are doing is iterating through the list L, assigning a temporary variable named i (can be whatever you want) for each item in L, and printing it. Here is another example:</p>
<p><code>&gt;&gt;&gt; students = ['John', 'Peter', 'Jeremy', 'Carly']<br />
&gt;&gt;&gt; for student in students:<br />
…     print "You are a very good student, %s. " %(student)<br />
…<br />
You are a very good student, John.<br />
You are a very good student, Peter.<br />
You are a very good student, Jeremy.<br />
You are a very good student, Carly.</code></p>
<p>This construct is called a for loop. It is the first compound statement that we look at. Notice that the first line, the header, of the loop terminates in a colon. Notice also that the second line of each of the two examples above, are indented. This is very important, as we will see later. The body of a for loop doesn’t have to be limited to one line. It can contain as many lines of commands as desired. It will execute all the commands of the body for each iteration, unless otherwise told in the code.<br />
It is important to understand that the for loop is a sequence iterator. It can iterate through ordered sequence items, such as strings, lists, tuples, etc. This will carry you a long way in your programming needs. However, there is another way to iterate or repeat a series of commands. But before we see it, you need to understand another important concept.</p>
<p><a name="truth tests"><br />
<h2>“truth” Tests</h2>
<p></a></p>
<p>In computer programming, certain expressions evaluate, to either truth or false. For example, we know that it is true that 5 is greater than 4. Python knows that too, and this is how Python expresses that:</p>
<p><code>&gt;&gt;&gt; 5 &gt; 4<br />
1</code></p>
<p>As you can see, the expression 5 &gt; 4 returned a value of 1. In programming, when evaluating the truthfulness of an expression, 1 is the common value for true and 0 is the common value for false. For example:</p>
<p><code>&gt;&gt;&gt; 4 == 5<br />
0</code></p>
<p>On this example you can see that to evaluate the equality of two values we used two equal signs rather than one. This is because, as we saw earlier, one equal sign is the assignment operator. So remember to use two equal signs when evaluating equality.<br />
Besides math operations, Python recognizes other expressions as either true or false. For example, empty data types, like an empty string, list, etc, evaluate to false. There are also many operators that can be used inside a truth test expression. See the Python documentation for these if you are interested.<br />
You will understand truth tests better by seeing them in action. So, let’s dive into our second method of iteration.</p>
<p><a name="while loops"><br />
<h2>“while” Loops</h2>
<p></a></p>
<p>A while loop repeats a set of commands until some terminating condition is met. They may never execute the body of the loop if the terminating condition is false to start with. Here is a basic example:</p>
<p><code>&gt;&gt;&gt; x = 1<br />
&gt;&gt;&gt; while x &lt; 10:<br />
…     print x,<br />
…     x = x + 1<br />
1 2 3 4 5 6 7 8 9</code></p>
<p>Here you can see that the condition that we test for is whether x is less than 10. This little loop will continue repeating itself until that condition is false. You may also notice that by adding a comma at the end of a print statement it does not print a new line character after each print. So, all the numbers are printed in the same line.<br />
One important lesson to remember with while loops is that, unless you want the loop to run forever, you should be sure that the condition will eventually be false. Let’s just look at another simple example to solidify your understanding:</p>
<p><code>&gt;&gt;&gt; s = 'Something'<br />
&gt;&gt;&gt; while s:<br />
…     print s,<br />
…     s = s[1:]     # Removes the first character of the string<br />
'Something' 'omething' 'mething' 'ething' 'thing' 'hing', 'ing', 'ng', 'g'</code></p>
<p>In this case, once the string is empty, the while loop stops because s evaluates to false.<br />
So, as we can see, without truth tests while loops would not be possible. However, there is an even more basic programming feature where truth tests play a key role. With it we will be able to start adding real intelligence to our programs.</p>
<p><a name="if statements"><br />
<h2>“if” Statements</h2>
<p></a></p>
<p>The if statement allows our programs to select a course of action depending on whether or not a certain condition exists. The if statement is the third multi-line or compound statement that we look at. Let’s look at an example:</p>
<p><code>&gt;&gt;&gt; if 5 &gt; 4:<br />
…     print "Life is good"</code></p>
<p>As in the previous compound statements, if statements have a header. The header begins with the if word itself followed by the expression that is to be evaluated, and ends with a colon. Again the body of the statement is indented.<br />
Let’s look at a more realistic example:</p>
<p><code>&gt;&gt;&gt; first_name = 'Bob'<br />
&gt;&gt;&gt; last_name = ''<br />
&gt;&gt;&gt; Greeting = 'Hello %s %s' % (first_name, last_name)<br />
&gt;&gt;&gt; if first_name and last_name:<br />
…     print Greeting</code></p>
<p>In this example we can see that the Greeting would only be printed if both first_name and last_name evaluate to true. Since, in this case, last_name is an empty string it will evaluate to false, and the Greeting will not be printed. Python will simply continue to its next command outside of the body of the if statement. Let’s look at another example:</p>
<p><code>age = int(raw_input("How old are you? "))     #The int function returns its input as integer.<br />
gender = raw_input("Are you male or female? ")<br />
if age &gt;= 13 and age &lt;= 19:<br />
    if gender.capitalize() == &quot;Male&quot;:<br />
        print &quot;You are a teenage boy.&quot;<br />
    else:<br />
        print &quot;You are a teenage girl.&quot;</code></p>
<p>The raw_input function allows us to get input from the user. If we type those commands in a file named test.py and ran it as a script from the Command Prompt (e.g.: ~\somedirectory&gt;python test.py) we would get the following output:</p>
<p><code>How old are you? 15<br />
Are you male or female? Male<br />
You are a teenage boy.</code></p>
<p>Here we can see that &#8220;if&#8221; statements can be nested inside other &#8220;if&#8221; statements. The same is true for any other compound statement. You can nest compound statements as deep as you like. In this example we also see that an &#8220;else&#8221; statement can be used in conjunction with an &#8220;if&#8221; statement. An &#8220;if/else&#8221; combination allows the program to decide between two courses of action. Only one of the two will be executed. A similar construct is the &#8220;elif&#8221; statement (which stands for “else if”) which allows the program to choose from any number of ways to proceed depending on which condition is found to match first. For example:</p>
<p><code>&gt;&gt;&gt; if day == "Saturday":<br />
…     print "Happy day"<br />
… elif day == "Sunday":<br />
…     print "Weekend is almost over."<br />
… elif month != "August":<br />
…     print "Today is not an August weekend"<br />
… elif hour &gt; 22:<br />
…     print "Time to go to bed"<br />
… else:<br />
…     print "Today is not a weekend, it is August and I still have time to do something"</code></p>
<p>With &#8220;if&#8221; statements we can give our programs many options to select from. It will check each one in order and select the first one that returns a true evaluation. Notice that the “not equal” operator (<font face="courier">!=</font>) returns a true evaluation if the &#8220;Month&#8221; variable is anything other than “August”. Something to watch out for in this kind of construct is that the “Time to go to bed” string will not get printed even if it is past 10:00 p.m., unless all the previous options were false. And finally, notice that we ended the sequence of statements with an else block. This one will get executed for sure once all the previous options proved false.<br />
So, as you can see, truth tests in conjunction with if/elif/else statements can be very powerful in helping you express the logic of your program. The if statement is very often found inside while and for loops to change the flow of operation of the loop or to exit the loop if a certain condition is found. Let’s look at an example:</p>
<p><code>&gt;&gt;&gt; L = ["mouse","", "cat", "dog", "parrot"]<br />
&gt;&gt;&gt; for animal in L:<br />
…     if animal == "dog":<br />
…         print "Dogs are not allowed"<br />
…         break<br />
…     elif animal == "":<br />
…         pass<br />
…     else:<br />
…         print "What a nice %s you have" %(animal)<br />
…<br />
What a nice mouse you have<br />
What a nice cat you have<br />
Dogs are not allowed</code></p>
<p>The break statement is used to exit the current loop. If the loop of this example had been inside another loop, the break statement would have simply continued to the next iteration of the outer loop. The pass keyword simply tells Python to do nothing. Again, notice the all important use of indentation to correctly identify the end of nested statements.<br />
What we have covered so far is enough for you to be able to write very rich and powerful programs. However, we have just touched the most basic elements of computer programming. There are a few more concepts to learn in order to take full advantage of what can be done in Python. We will look at them in Python for Newbies – <a href="http://temporaryland.wordpress.com/2011/01/27/python-for-newbies-part2/">Part 2</a>.</p>
<p><a name="About this tutorial"><br />
<h1>About this tutorial</h1>
<p></a><br />
I learned Python from a few different sources.  I picked up quite a bit from several online books and tutorials, such as <a href="http://www.greenteapress.com/thinkpython/thinkpython.html">this one</a>. However, neither of the online tutorials felt easy enough for me.  Most of them felt like they were made by geniuses for geniuses.  I wanted something that expressed the concepts more simply and more logically, without making me do intellectual gymnastics to get there.  Fortunately, I found that the book <a href="http://oreilly.com/catalog/9780596002817">Learning Python</a>, by Mark Lutz, was exactly what I was looking for, and finally got me over the learning hump.</p>
<p>I first created this tutorial in 2001 while volunteering at a non-profit organization.  It was originally meant to encourage the use of Python within that organization.  I tried to condense the ideas and the logic found in the &#8220;Learning Python&#8221; book and make them even more simple.  The book <a href="http://oreilly.com/catalog/9780596002817">Learning Python</a> is a lot more comprehensive and I definitely recommend it to any one seriously interested in getting into Python.  This tutorial is good for those that want to ease into Python or into programing in general.</p>
<p>The version of Python and other libraries targeted by the tutorial will be initially 2.7.  Python 3.0 has several changes in the language that make it incompatible with this tutorial.  I hope to incorporate those changes into this tutorial some time in the future.  Some sections of this tutorial, specifically the GUI portions, have not yet been finished.</p>
<p>This tutorial is made available to you under the Creative Commons Attribution-Share Alike 3.0 license:</p>
<p><a href="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0/</a><br />
<a href="http://creativecommons.org/licenses/by-sa/3.0/legalcode">http://creativecommons.org/licenses/by-sa/3.0/legalcode</a></p>
<p>Joe Crawford has been working on an expanded version of this tutorial.  I haven&#8217;t had a chance to review it, but you may want to take a look at it.  It can be found here:<br />
<a href="http://www.teaching3d.com/w/?page_id=188"></p>
<p>http://www.teaching3d.com/w/?page_id=188</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=476&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/01/26/python-for-newbies/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/01/python_indexes.jpg?w=300" medium="image">
			<media:title type="html">String Indexes</media:title>
		</media:content>
	</item>
		<item>
		<title>Amarok and digiKam on Windows</title>
		<link>http://temporaryland.wordpress.com/2011/01/06/amarok-and-digikam-on-windows/</link>
		<comments>http://temporaryland.wordpress.com/2011/01/06/amarok-and-digikam-on-windows/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 22:29:22 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=456</guid>
		<description><![CDATA[While I do believe that most people would be better off running Linux, I fully understand that for some people this is just not feasible, for one reason or another. Even I have to run Windows occasionally at work. Fortunately, some of my favorite Linux programs are gradually becoming available in Windows. This makes using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=456&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While I do believe that most people would be better off running Linux, I fully understand that for some people this is just not feasible, for one reason or another.  Even I have to run Windows occasionally at work.  Fortunately, some of my favorite Linux programs are gradually becoming available in Windows.  This makes using Windows at least a bit more bearable for me.  </p>
<h2>digiKam</h2>
<p>Lets start with digiKam.  I was very pleased to see that the latest Windows release includes all the necessary dependencies in one (huge) installation file.  When I say huge, I mean 256 MB.  But, I really did not mind, as long as it worked.  Fortunately, it does!</p>
<div id="attachment_457" class="wp-caption aligncenter" style="width: 310px"><a href="http://temporaryland.files.wordpress.com/2011/01/03_tip.jpg"><img src="http://temporaryland.files.wordpress.com/2011/01/03_tip.jpg?w=300&#038;h=249" alt="digiKam on Windows" title="digiKam on Windows" width="300" height="249" class="size-medium wp-image-457" /></a><p class="wp-caption-text">digiKam on Windows</p></div>
<p>I found digiKam 1.7 for Windows here:</p>
<p><a href="http://www.digikam.org/drupal/node/559">http://www.digikam.org/drupal/node/559</a></p>
<p>However, check the normal download page to see if by the time you read this a newer version is available.  I installed it on a partition with Windows 7 64 bit.  After installation I had to change the digiKam shortcut properties to set it to run in XP sp3 compatibility mode.  Otherwise the program would crash when saving an image.  </p>
<div id="attachment_458" class="wp-caption aligncenter" style="width: 387px"><a href="http://temporaryland.files.wordpress.com/2011/01/04_compatibility.jpg"><img src="http://temporaryland.files.wordpress.com/2011/01/04_compatibility.jpg?w=460" alt="Compatibility mode" title="Compatibility mode"   class="size-full wp-image-458" /></a><p class="wp-caption-text">Compatibility mode</p></div>
<p>Since making this small change it has been running quite well and I have had no more crashes.  (See the known bugs list for a few things to avoid doing though.)  If you want to get rid of the annoying UAC warning that you get because of running in compatibility mode you may want to try this small little program called &#8220;<a href="http://www.itknowledge24.com/">UAC Trust Shortcut</a>&#8221; that worked well for me.</p>
<p>I have been using digiKam to blend bracketed images with great results.  I get much better results blending bracketed images with digiKam than with Photshop, using Photomatix or not.  Because of that, I wanted to make sure I could use this feature in my Windows installation.  It depends on a couple of programs that are not included in the installation file, but geting them to work is not hard.  This is what I did:</p>
<p>1) Install digiKam for Windows, of course.</p>
<p>2) Install <a href="http://hugin.sourceforge.net/download/]Hugin Download">Hugin</a>, either 32 or 64 bit according to your OS.</p>
<p>3) Right click on the Hugin desktop shortcut that was created in the installation and select properties.  Click on &#8220;Open File Location&#8221;.  Right click on the file called &#8220;align_image_stack.exe&#8221; and select Copy.  Go to the folder where digiKam was installed to and Paste the file in there.  On my computer that folder is:</p>
<p>C:\Program Files (x86)\digiKam\kde4\bin</p>
<p>4) Download <a href="http://sourceforge.net/projects/enblend/files/enblend-enfuse/enblend-enfuse-4.0/enblend-enfuse-4.0-win32.zip/download">Enfuse</a>.</p>
<p>5) Extract the contents of the ZIP file any where you want and copy the file called &#8220;enfuse.exe&#8221; into the digiKam folder as in step number 3.</p>
<p>That is it.  Now you can select several bracketed images and go to Tools &gt; Blend bracketed images.  Enjoy!</p>
<h2>Amarok</h2>
<p>The other program that I am very happy to have in Windows is Amarok.  The Amarok folks have created installation packages for Windows.  You can get them here:</p>
<p><a href="http://amarok.kde.org/wiki/Download:Windows">http://amarok.kde.org/wiki/Download:Windows</a></p>
<p>However, an interesting alternative is to use Clementine.  This is the route I took on Windows.  Clementine is a fork of Amarok that came about when Amarok moved to the 2.x version. Some users were so reluctant to let go of the 1.x version that they decided to fork it and continue maintaining it as &#8220;<a href="http://www.clementine-player.org/">Clementine</a>&#8220;. They have not only released a series of versions (now at .06) for Linux, but have now released a Windows version. And you know what, it works! I am impressed. And have now finally found a Windows music player that I can honestly say I really like. See what you think. (Oh, and make sure to try the &#8220;Dynamic Random Mix&#8221;. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<div id="attachment_459" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2011/01/clementine.jpg"><img src="http://temporaryland.files.wordpress.com/2011/01/clementine.jpg?w=460&#038;h=380" alt="Clementine" title="Clementine" width="460" height="380" class="size-full wp-image-459" /></a><p class="wp-caption-text">Clementine</p></div>
<p>I know that some people bemoan the fact that these precious Linux jewels are now available for Windows users.  They think that it lessens the need for people to move to Linux.  However, I think that Linux is still a better OS for most people.  The performance of PCLinuxOS is way better than XP, Vista, or Windows7. I see it with my own eyes every day. I think it is much nicer looking than Windows (which borrowed many of its face lift accents from KDE any way).  Once it is installed, Linux is just about as easy to use as Windows, especially if the user is computer illiterate since there is even less to unlearn. Most hardware is easier to configure in Linux since it is just a matter of plugging it in. PCLinuxOS makes installing printers and scanners a snap. The only thing harder to do in Linux is catching a virus. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Several friends have come to me for help with their virus infested Windows machines. I always encourage them to try Linux first, for a little while. I promise them that if they don&#8217;t like it or it doesn&#8217;t work for them I will install Windows back on for them. So far, none of the families I have done this for have asked for Windows to be put back. Some of them are going into their third year of using Linux, and they are not computer savvy at all. Their daughters are able to do their home work just fine. Each one has their own account and password. The parents enjoy the parental controls that come built in with PCLinuxOS. Most people, including the elderly just need a few minutes to be shown where is the software installer and how to open their programs. I tell all my PCLinuxOS users to open the package manager once a week to install any available updates. It is a matter of 1, 2, 3. And I have not yet encountered any one for whom this is too hard to do.  So far so good. It has worked for them. It has worked for me and my family for many years.</p>
<p>I always try to stir people into using PCLinuxOS instead of Ubuntu, or its derivatives, for several reasons.</p>
<ul>
<li>It is a rolling release. Your upgrades come along with your updates. No need to re-install every six months. </li>
<li>It is measurably faster than Ubuntu. It uses the BFS kernel by default. </li>
<li>It stays very current in its application and library versions. Ubuntu has a tendency to fall behind. For example, I have been using digiKam 1.7 since the day it was released,while last I checked most Ubuntu users were still using the ancient 1.0 version.</li>
</ul>
<p>But of course, in the end, you should use what you like and what works for you.  We are fortunate to have so many options.</p>
<p>So there you have it.  Things get better for Windows, but Linux keeps pulling ahead.  Good news all around. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update:</strong> Please notice that some of the links above may not be pointing to the latest offerings.  For example, digiKam has a new Windows release.  Read about it <a href="http://scribblesandsnaps.wordpress.com/2011/10/22/digikam-2-2-0-installer-for-windows/" title="digiKam 2.2.0 for Windows" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/456/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=456&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2011/01/06/amarok-and-digikam-on-windows/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/01/03_tip.jpg?w=300" medium="image">
			<media:title type="html">digiKam on Windows</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/01/04_compatibility.jpg" medium="image">
			<media:title type="html">Compatibility mode</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2011/01/clementine.jpg" medium="image">
			<media:title type="html">Clementine</media:title>
		</media:content>
	</item>
		<item>
		<title>Keeping your computers in sync</title>
		<link>http://temporaryland.wordpress.com/2010/12/07/keeping-your-computers-in-sync/</link>
		<comments>http://temporaryland.wordpress.com/2010/12/07/keeping-your-computers-in-sync/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 21:29:08 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Products]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=418</guid>
		<description><![CDATA[We like data If you are like me, you have several computers or devices that you use to access your data at different times during the day. I personally have a PC that we use mostly for multimedia stuff (video, music, pictures, etc.) in the living room. It also has a database of the movies [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=418&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>We like data</h2>
<p>If you are like me, you have several computers or devices that you use to access your data at different times during the day.  I personally have a PC that we use mostly for multimedia stuff (video, music, pictures, etc.) in the living room.  It also has a database of the movies we own or that we have recorded in our VHS tapes collection (don&#8217;t laugh).  However, from time to time I do like to access other personal or business data from it.  I have another computer in our home office and I like to have access to all my data from here too.  Likewise from my laptop.  At work I like to have access to some of my data as well.  Oh, and it is nice to have access to all that from my phone as well.</p>
<h2>The problem is</h2>
<p>Of course, the problem is that once you modify the data residing on any one of the machines, the other machines now need to get updated.  But that is easier said than done.  What if you haven&#8217;t used one of those devices for a while?  In the mean time, you have edited a spread sheet, added a few pictures, deleted a few songs and added a few others.  How are you going to remember what needs to be updated?</p>
<p>Well, there are several programs that one can use to try and get a hold on this madness.  For example, Linux has the venerable rsync program and its variants (like grsync, krsync, QtRsync, etc.).  On Windows you can use <a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=c26efa36-98e0-4ee9-a7c5-98d0592d8c52&amp;displaylang=en&amp;pf=true">SyncToy</a>.  This can work.  However, it can be tedious.  Also, the possibility exists of you making a mistake and loosing some data.  (Believe me, I know.)  Is there a better way?  Well, of course, there always is.</p>
<p>One way to do this would be to have all your data on a single location that is always available online.  When you need something you simply open it directly from your remote device.  Of course this has several advantages, but also, several disadvantages.  For example, trying to browse your photos or playing your music that way can be very inconvenient. What if you are trying to access the data from somewhere that has a very slow connection or no connection at all? There has to be a better way.  Well, of course, there always is.  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>Enter Dropbox</h2>
<p><a href="https://www.dropbox.com/referrals/NTEzNDk1MDU0OQ?src=global0"><img src="http://temporaryland.files.wordpress.com/2010/12/dropboxlogo.png?w=460" alt="Dropbox" title="Dropbox"   class="aligncenter size-full wp-image-426" /></a></p>
<p>A better way that I have been enjoying recently is using an online service called <a href="https://www.dropbox.com/referrals/NTEzNDk1MDU0OQ?src=global0">Dropbox</a>.  The beauty of Dropbox, is that your data remains local on all your devices.  But, when you make a change, any change, the service ensures that all your other devices get updated automatically.  It is very easy to use and it works on Linux as well as on Windows.  You do have to have a small program installed on each of the machines that you want to have it working on.  The program is available on PCLinuxOS right off the repository.  On both Linux and Windows the program is very light on resources and sits quietly on your task bar tray.  There is also a program available for the Nokia N900, <a href="http://talk.maemo.org/showthread.php?t=58882">DropN900</a>, that works very well.</p>
<p>Thanks to Dropbox, I don&#8217;t have to worry about keeping my Keepass database in sync when I add a new password.  The book I am working on, as well as all the research I do for it, is always in sync no matter what device I use to edit it.  Also, there are several other nice features I enjoy from Dropbox.  For example, if on your Photos directory you make a new folder with, say, your last vacation photos, sharing them with all your family becomes very easy.  All you have to do is log in to your <a href="https://www.dropbox.com/referrals/NTEzNDk1MDU0OQ?src=global0">Dropbox</a> account and go to http://www.dropbox.com/photos.  You will see the folder you created there.  Click on it, and besides being able to view the photos right there, a link is provided for you so that you can just send it to whoever you want to.  They will be able to see your photos right there or download the full size images!  I tell you, this is very much so, a better way to keep your data in sync.</p>
<h2>To trust or not to trust</h2>
<p>The only problem is, do you trust the people in Dropbox to respect your privacy?  Well, I don&#8217;t trust them completely, but I do trust them enough to share some of my non-sensitive data through them and to have their client program run on my computers. What would it take for me to trust them completely?  Well, I don&#8217;t think it is possible.  But, I am very happy their service exists and I do hope that they work hard to keep earning the little or much trust that I do have on them.  How about you?</p>
<h2>PS:</h2>
<p>If you want more privacy, you may want to try using <a href="http://www.truecrypt.org/">TrueCrypt</a> in conjunction with Dropbox.  TrueCrypt is a free, open source, cross platform, application that allows you to encrypt disks, partitions, and/or containers. A container is basically a file that you can mount as a virtual disk.  TrueCrypt is on the PCLinuxOS repositories, but it is a slightly older version than the one on the TrueCrypt website.  But that is not a problem as long as you create the encrypted container in PCLinuxOS. I have tested the round trip of the container and its data this way and it works well.</p>
<p>Also, on PCLinuxOS you will need to add yourself to the sudoers file. That is very easy to do. Just open up the terminal as root and type “visudo”. Somewhere down the file, type this (if your username is rm42)</p>
<p>rm42 ALL=NOPASSWD:/usr/bin/truecrypt</p>
<p>I am making a series of smallish container files of about 50 MB each where I plan to store my more sensitive data.  I hope this helps.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/418/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=418&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2010/12/07/keeping-your-computers-in-sync/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/dropboxlogo.png" medium="image">
			<media:title type="html">Dropbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Out of the darkness comes Enlightenment</title>
		<link>http://temporaryland.wordpress.com/2010/12/03/enlightenment/</link>
		<comments>http://temporaryland.wordpress.com/2010/12/03/enlightenment/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 16:33:25 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://temporaryland.wordpress.com/?p=385</guid>
		<description><![CDATA[Although KDE is my work horse, every day, desktop environment, I enjoy testing different environments from time to time. Enlightenment is one environment that I had wanted to try for a while. I remember seeing some beautiful Enlightenment screen shots about 10 years ago. However, at the time, installing it was not an easy task. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=385&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although KDE is my work horse, every day, desktop environment, I enjoy testing different environments from time to time.  <a href="http://www.enlightenment.org/p.php?p=about&amp;l=en">Enlightenment</a> is one environment that I had wanted to try for a while.  I remember seeing some beautiful Enlightenment screen shots about 10 years ago.  However, at the time, installing it was not an easy task.  And frankly, KDE fulfilled all my needs on a DE.  However, my admiration for Enlightenment has never really gone away.  So, I was glad when I heard that <a href="http://www.pclinuxos.com/?page_id=215">PCLinuxOS had a release sporting this DE</a>.  Knowing how easy it is to install and maintain a PCLinuxOS desktop, I thought this may be the time to finally give Enlightenment a try.  And I was right.</p>
<p>I have only started playing with it, so don&#8217;t expect a deep review.  I only want to highlight the beauty of the environment and the good job the PCLinuxOS team did in customizing it for their distro.  If you want to learn a bit more about how to configure it, the PCLinuxOS forum has lots of information about it.  See <a href="http://www.pclinuxos.com/forum/index.php/topic,69723.0.html">here</a> for example.  </p>
<p>Lets now look at the PCLinuxOS Enlightenment release.  This is what the Grub boot screen looks like:</p>
<div id="attachment_394" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2010/12/03_grub.jpg"><img src="http://temporaryland.files.wordpress.com/2010/12/03_grub_sml.jpg?w=460&#038;h=345" alt="PCLOS Enlightenment Grub Menu" title="PCLOS Enlightenment Grub Menu" width="460" height="345" class="size-full wp-image-394" /></a><p class="wp-caption-text">Click for larger image.</p></div>
<p>Not a bad start, eh? Here is the desktop log in screen.  (Boy, that&#8217;s what I&#8217;m talking about.)<br />
<div id="attachment_396" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2010/12/04_loginscreen.jpg"><img src="http://temporaryland.files.wordpress.com/2010/12/04_loginscreen_sml.jpg?w=460&#038;h=332" alt="PCLinuxOS Enlightenment Login Screen" title="PCLinuxOS Enlightenment Login Screen" width="460" height="332" class="size-full wp-image-396" /></a><p class="wp-caption-text">Click for larger image.</p></div></p>
<p>This is the screen you see as the desktop is being loaded.  (The little white dots are animated gently going up and down.)<br />
<div id="attachment_398" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2010/12/05_desktoploading.jpg"><img src="http://temporaryland.files.wordpress.com/2010/12/05_desktoploading_sml.jpg?w=460&#038;h=343" alt="PCLinuxOS Enlightment Desktop Loading" title="PCLinuxOS Enlightment Desktop Loading" width="460" height="343" class="size-full wp-image-398" /></a><p class="wp-caption-text">Click for larger image.</p></div></p>
<p>Here is what a freshly installed PCLinuxOS Enlightenment desktop looks like.<br />
<div id="attachment_400" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2010/12/06_installeddesktop.jpg"><img src="http://temporaryland.files.wordpress.com/2010/12/06_installeddesktop_sml.jpg?w=460&#038;h=344" alt="PCLinuxOS Enlightenment Desktop" title="PCLinuxOS Enlightenment Desktop" width="460" height="344" class="size-full wp-image-400" /></a><p class="wp-caption-text">Click for larger image.</p></div></p>
<p>What you see on the top left is the clock.  The little green dot is the seconds marker.  Looks very sleek in my opinion.  The bar at the bottom works very much like the OS X one.  The icons get larger as you mouse over them.  Running applications add an icon at the right of the bar.  The application menu is accessed by left clicking on the desktop.  This is what it looks like:</p>
<div id="attachment_402" class="wp-caption aligncenter" style="width: 470px"><a href="http://temporaryland.files.wordpress.com/2010/12/08_applications.jpg"><img src="http://temporaryland.files.wordpress.com/2010/12/08_applications_sml.jpg?w=460&#038;h=344" alt="PCLinuxOS Enlightenment Application Menu" title="PCLinuxOS Enlightenment Application Menu" width="460" height="344" class="size-full wp-image-402" /></a><p class="wp-caption-text">Click for larger image</p></div>
<p>As you can see above, there is a red button at the bottom of the Applications Menu that is called &#8220;System&#8221;.  This is what you get when you click on it:</p>
<p><img src="http://temporaryland.files.wordpress.com/2010/12/09_goodbye.jpg?w=460" alt="PCLinuxOS Enlightenment System Button Options" title="PCLinuxOS Enlightenment System Button Options"   class="aligncenter size-full wp-image-403" /></p>
<p>Obviously, that is where you go to terminate your session.  And that is where we are going to say good bye for now.  I hope you enjoyed this visual tour of the PCLinuxOS 2010.11 Enlightenment Desktop.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/temporaryland.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/temporaryland.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/temporaryland.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=temporaryland.wordpress.com&amp;blog=2174446&amp;post=385&amp;subd=temporaryland&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://temporaryland.wordpress.com/2010/12/03/enlightenment/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d0226e7a6097c20a436396a1942d4b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rm42</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/03_grub_sml.jpg" medium="image">
			<media:title type="html">PCLOS Enlightenment Grub Menu</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/04_loginscreen_sml.jpg" medium="image">
			<media:title type="html">PCLinuxOS Enlightenment Login Screen</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/05_desktoploading_sml.jpg" medium="image">
			<media:title type="html">PCLinuxOS Enlightment Desktop Loading</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/06_installeddesktop_sml.jpg" medium="image">
			<media:title type="html">PCLinuxOS Enlightenment Desktop</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/08_applications_sml.jpg" medium="image">
			<media:title type="html">PCLinuxOS Enlightenment Application Menu</media:title>
		</media:content>

		<media:content url="http://temporaryland.files.wordpress.com/2010/12/09_goodbye.jpg" medium="image">
			<media:title type="html">PCLinuxOS Enlightenment System Button Options</media:title>
		</media:content>
	</item>
	</channel>
</rss>
