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

<channel>
	<title>The Maemo &#187; nokia</title>
	<atom:link href="http://www.themaemo.com/tag/nokia/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themaemo.com</link>
	<description>Maemo News , Hacks , Themes , Wallpapers and More</description>
	<lastBuildDate>Tue, 25 May 2010 10:36:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python for Newbies &#8211; Tutorial &#8211; Part Two</title>
		<link>http://www.themaemo.com/python-for-newbies-part-two/</link>
		<comments>http://www.themaemo.com/python-for-newbies-part-two/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 20:47:37 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=214</guid>
		<description><![CDATA[This is part two of the Python for Newbies tutorial. Part One can be found here. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fpython-for-newbies-part-two%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fpython-for-newbies-part-two%2F" height="61" width="51" /></a></div>
<p>This is part two of the <a href="http://www.themaemo.com/python-for-newbies/" target="_blank">Python for Newbies tutorial</a> . Part One can be found <a href="http://www.themaemo.com/python-for-newbies/">here</a>. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license:</p>
<p>http://creativecommons.org/licenses/by-sa/3.0/</p>
<p>http://creativecommons.org/licenses/by-sa/3.0/legalcode</p>
<p><a name="Functions"></a></p>
<h2>Functions</h2>
<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 del 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.<span id="more-214"></span></p>
<p><a name="Defining a function"></a></p>
<h3>Defining a function</h3>
<p>Here is a brief example that we can examine:<br />
<code language="python"><br />
&gt;&gt;&gt; def average(num1, num2):<br />
</code><br />
<code language="python">...     avrg = (num1 + num2) / 2</code></p>
<p><code language="python">...     return avrg</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:<br />
<code language="python"><br />
def personal_info(name, phone, country = 'USA'):<br />
</code><br />
The third parameter of this function has a default value, the string &#8216;USA&#8217;. That means that when calling this function the third parameter is optional. We could call the function like this:<br />
<span style="font-family: Courier New,monospace;"><br />
personal_info(Joe, 1234-5678)<br />
</span><br />
The function would accept the call and use &#8216;USA&#8217; as the value for the third parameter. Of course, we would also have the option of using a different third parameter, like this:<br />
<code language="python"><br />
personal_info(Bob, 987-6543, 'UK')<br />
</code><br />
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 <span style="font-family: Courier New,monospace;">return</span> statement. Why is that? Why couldn&#8217;t we just be satisfied with having the variable avrg 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"></a></p>
<h3>Namespaces and Scope</h3>
<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 &#8211; the nested namespace.</li>
</ul>
<p>Here is an example of how the nested namespace would work:<br />
<span style="font-family: Courier New,monospace;"><br />
operation = 1     # Variable defined in the Global namespace. Always accessible.</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; def some_function(operation, num1, num2):</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;     if operation == 1:</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;         x=num1 &nbsp;&nbsp;&nbsp;&nbsp;#Variables defined in some_function&#8217;s local namespace.</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;         y=num2</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;         def multiply():</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;             print x * y &nbsp;&nbsp;&nbsp;&nbsp;    # x and y are not in the local namespace of multiply.</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;         multiply()<br />
</span><br />
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&#8217;s look at an example.<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; value= 1</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; def change_value():</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;     value = 2</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;     print value</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; change_value()</span></p>
<p><span style="font-family: Courier New,monospace;">2</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; print value</span></p>
<p><span style="font-family: Courier New,monospace;">1<br />
</span><br />
As you can see, when we assigned <span style="font-family: Courier New,monospace;">2</span> as the value of <span style="font-family: Courier New,monospace;">value</span> inside the <span style="font-family: Courier New,monospace;">change_value</span> function, the assignment took place only in the local namespace of the function. The Global variable <span style="font-family: Courier New,monospace;">value</span> 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: <span style="font-family: Courier New,monospace;">value=change_value()</span>) In any case the workaround is the use of the <span style="font-family: Courier New,monospace;">global</span> statement. Let&#8217;s try it.<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; var = 1</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; def func(val):</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;     global var</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;     var =val*2</span></p>
<p><span style="font-family: Courier New,monospace;">&#8230;</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; func(3)   </span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; print var   </span></p>
<p><span style="font-family: Courier New,monospace;">6<br />
</span><br />
So, thanks to the use of the global statement, our function successfully changed the value of a variable defined in the Global namespace. If <span style="font-family: Courier New,monospace;">var</span> 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"></a></p>
<h2>Modules</h2>
<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 &#8220;import&#8221; in order to use. Let&#8217;s look at an example:<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; import os</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; os.getcwd()</span></p>
<p><code language="python">'/home/me'<br />
</code><br />
The first line, above, uses the import statement to gain access to all the classes, functions and variables defined in a module called os. (As you can imagine the os module contains code related to the use of the operating system.) Notice that to access the getcwd 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&#8217;s look at another function in this module:<br />
<code language="python"><br />
&gt;&gt;&gt; os.chdir('/home/me/MyDocs')</code></p>
<p><code language="python">&gt;&gt;&gt; os.getcwd()</code></p>
<p><code language="python">'/home/me/MyDocs'<br />
</code><br />
Here we used the chdir function to change our current working directory to &#8216;/home/me/MyDocs&#8217;. 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 &#8211; it is the &#8216;escape&#8217; 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 os.sep instead of /.)</p>
<p>To remove a module that we have imported we again can use the handy del function:<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; del(os)<br />
</span><br />
We could also import one or more specific items from a module. This is how we would do that:<br />
<code language="python"><br />
&gt;&gt;&gt; from os import listdir, getcwd</code></p>
<p><code language="python">&gt;&gt;&gt; listdir(getcwd())</code></p>
<p><code language="python">['somefile.txt', 'Dir', 'Dir2', 'File', 'File.txt']<br />
</code><br />
The listdir 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 &#8216;best practice&#8217; 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.</p>
<p>Here is another example, one we made reference to earlier.<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; from __future__ import division</span></p>
<p><span style="font-family: Courier New,monospace;">&gt;&gt;&gt; 7/2</span></p>
<p><span style="font-family: Courier New,monospace;">3.5<br />
</span><br />
Here you see how to make the N900&#8217;s version of Python handle division as Python 3.x does.</p>
<p>There are dozens of modules included in a Python distribution. This collection of modules is called Python&#8217;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 &#8220;<a href="http://www.python.org/doc/2.5/modindex.html" target="New">Global Module Index</a>&#8221; 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 on the N900. One more that I 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. Of course, you shouldn&#8217;t need that for your N900 programs.</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 language="python">def greet(name):</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;print "Hello there, %s" %(name)</code></p>
<p><code language="python">greet('John')<br />
</code><br />
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.):<br />
<span style="font-family: Courier New,monospace;"><br />
&gt;&gt;&gt; import test</span></p>
<p><span style="font-family: Courier New,monospace;">Hello there, John<br />
</span><br />
Two things happened when we imported our module: The <code language="python">greet</code> function was defined, and the <code language="python">greet('John')</code> function call executed. Now, we can continue to use the <code language="python">greet</code> function with other function calls. For example:<br />
<code language="python"><br />
&gt;&gt;&gt; test.greet('Marla')</code></p>
<p><code language="python">Hello there, Marla</code></p>
<p><code language="python">&gt;&gt;&gt; test.greet('Michael')</code></p>
<p><code language="python">Hello there, Michael<br />
</code><br />
Now, open a Terminal session and go to the directory that contains your module. Then, try running test.py as a script. For example:<br />
<code language="python"><br />
/home/m/MyDocs/Test&gt; python test.py</code></p>
<p><code language="python">Hello there, John<br />
</code><br />
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 <code language="python">greet</code> function.</p>
<p>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:<br />
<code language="python"><br />
import sys</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;for item in sys.argv:</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print item<br />
</code><br />
We could then run this script with a call like this:<br />
<code language="python"><br />
/home/m/MyDocs/Test&gt;python test.py First "Second" "And third"</code></p>
<p><code language="python">test.py</code></p>
<p><code language="python">First</code></p>
<p><code language="python">Second</code></p>
<p><code language="python">And third<br />
</code><br />
The parameters we give to our scripts when calling them are stored in a list called <span style="font-family: Courier New,monospace;">argv</span> accessible through the <span style="font-family: Courier New,monospace;">sys</span> module. The first parameter (<span style="font-family: Courier New,monospace;">argv[0]</span>) is the name of the script itself. So, in our example above, <span style="font-family: Courier New,monospace;">argv[1]</span> would be the parameter <span style="font-family: Courier New,monospace;">&#8220;First&#8221;</span>.</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.<br />
<code language="python"><br />
import sys</code></p>
<p><code language="python">def full_name(first, second):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;full = first + " " + second</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;return full</code></p>
<p><code language="python">def greet(name):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;print "Hello there, %s" %(name)</code></p>
<p><code language="python">fname = full_name(sys.argv[1], sys.argv[2])</code></p>
<p><code language="python">greet(fname)<br />
</code><br />
What we have here is a couple 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 <code language="python">import unames</code> and access them. However, you would then have a new <code language="python">fname</code> variable and the <code language="python">greet(fname)</code> 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:<br />
<code language="python"><br />
def full_name(first, second):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;full = first + " " + second</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;return full</code></p>
<p><code language="python">def greet(name):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;print "Hello there, %s" %(name)</code></p>
<p><code language="python">if __name__ =='__main__':</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;import sys</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;fname = full_name(sys.argv[1], sys.argv[2])</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;greet(fname)<br />
</code><br />
Notice that the import statement and the two function calls are only executed when a special condition is met &#8211; 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&#8217;s memory (using the del function) and import it again, or use the reload function like this:<br />
<code language="python"><br />
&gt;&gt;&gt; reload(test)<br />
</code><br />
Now that we are talking about files, why don&#8217;t we take a look at how we work with files from Python code.</p>
<p><a name="Working with files"></a></p>
<h2>Working with files</h2>
<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&#8217;s first create a new file:<br />
<code language="python"><br />
&gt;&gt;&gt; f = open('MyFile.txt', 'w')<br />
</code><br />
At this point the variable <span style="font-family: Courier New,monospace;">f</span> represents a new file object that has been created in the file system at the current working directory. Notice that the <span style="font-family: Courier New,monospace;">open</span> 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 <code language="python">'w'</code>, for write, or <code language="python">'r'</code>, for read. Let&#8217;s now write something into our file:<br />
<code language="python"><br />
&gt;&gt;&gt; f.write('This is a line inside the file.\nThis is another line.\n')</code></p>
<p><code language="python">&gt;&gt;&gt; f.write('This is the third line.')</code></p>
<p><code language="python">&gt;&gt;&gt; f.close()<br />
</code><br />
Now, if with a text editor we take a look at the file we created, the file should look like this:<br />
<code language="python"><br />
This is a line inside the file.</code></p>
<p><code language="python">This is another line.</code></p>
<p><code language="python">This is the third line.<br />
</code><br />
As you have probably figured out already, the <code language="python">'\n'</code> combination represents the &#8216;new line&#8217; 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:<br />
<code language="python"><br />
&gt;&gt;&gt; f = open('MyFile.txt', 'r')</code></p>
<p><code language="python">&gt;&gt;&gt; file_contents = f.readlines()     #The readlines method returns a list of lines.</code></p>
<p><code language="python">&gt;&gt;&gt; f.close()</code></p>
<p><code language="python">&gt;&gt;&gt; file_contents     #Just to show you the contents of file_contents.</code></p>
<p><code language="python">['This is a line inside the file.\012', 'This is another line.\012', 'This is the third line.']</code></p>
<p><code language="python">&gt;&gt;&gt; f = open('MyFile.txt', 'w')     #Now we open it again to write our changes.</code></p>
<p><code language="python">&gt;&gt;&gt; for line in file_contents:</code></p>
<p><code language="python">...     new_line = line.replace("line", "set of words")</code></p>
<p><code language="python">...     f.write(new_line)</code></p>
<p><code language="python">...</code></p>
<p><code language="python">&gt;&gt;&gt; f.close()<br />
</code><br />
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 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 &#8220;line&#8221; with &#8220;set of words&#8221;.</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&#8217;s take a very brief look at this subject.</p>
<p><a name="Classes and Objects"></a></p>
<h2>Classes and Objects</h2>
<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&#8217;t force us to program this way. OOP in Python is optional. Stil, 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&#8217;s look at an example:<br />
<code language="python"><br />
&gt;&gt;&gt; class Address:</code></p>
<p><code language="python">...     def setStreet(self, value):</code><br />
<code language="python">...         self.Street = value</code></p>
<p><code language="python">...     def setCity(self, value):</code><br />
<code language="python">...         self.City = value</code></p>
<p><code language="python">...     def display(self):</code><br />
<code language="python">...         print "The address is:"</code><br />
<code language="python">...         print self.Street</code><br />
<code language="python">...         print self.City<br />
</code><br />
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 &#8220;self&#8221;. 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 &#8217;self&#8217;. 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 &#8220;all too wonderful&#8221; for you, don&#8217;t worry. Just remember that you have to use self as the first parameter of your method definitions. If you don&#8217;t, Python will kindly remind you with an error message when you try to use the method.</p>
<p>Let&#8217;s now create an instance (object) from our class:<br />
<code language="python"><br />
&gt;&gt;&gt; address = Address()<br />
</code><br />
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&#8217;s give it some now:<br />
<code language="python"><br />
&gt;&gt;&gt; address.setStreet('157 Royal Road')</code></p>
<p><code language="python">&gt;&gt;&gt; address.setCity('NY')<br />
</code><br />
Notice that we have access to the methods defined in our class. Let&#8217;s display the contents of our object now:<br />
<code language="python"><br />
&gt;&gt;&gt; address.display()</code></p>
<p><code language="python">The address is:</code></p>
<p><code language="python">157 Royal Road</code></p>
<p><code language="python">NY<br />
</code><br />
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&#8217;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:<br />
<code language="python"><br />
&gt;&gt;&gt; address.Street</code></p>
<p><code language="python">'157 Royal Road'</code></p>
<p><code language="python">&gt;&gt;&gt; address.City</code></p>
<p><code language="python">'NY'<br />
</code><br />
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:<br />
<code language="python"><br />
&gt;&gt;&gt; dir(address)</code></p>
<p><code language="python">['Street', 'City']<br />
</code><br />
The dir function returns a list of all the names defined in the object. Finally, here is another little trick to help inspect objects:<br />
<code language="python"><br />
&gt;&gt;&gt; address.__dict__</code></p>
<p><code language="python">{'Street':'157 Royal Road', 'City':'NY'}<br />
</code><br />
Every object has to have a built-in location to store its instance names and values. That place is the __dict__ 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:<br />
<code language="python"><br />
&gt;&gt;&gt; Address.__dict__</code></p>
<p><code language="python">{'display': , 'setStreet': , '__doc__': None, 'setCity': , '__module__': '__main__'}<br />
</code><br />
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&#8217;s take a quick look at them now.</p>
<p><a name="Errors and Error Handling"></a></p>
<h2>Errors and Error Handling</h2>
<p>What we commonly refer to as &#8216;errors&#8217; 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 &#8216;debuggers&#8217; 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:<br />
<code language="python"><br />
&gt;&gt;&gt; print something</code></p>
<p><code language="python">Traceback (most recent call last):</code></p>
<p><code language="python">File "", line 1, in ?</code></p>
<p><code language="python">NameError: There is no variable named 'something'<br />
</code><br />
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 &#8211; right now, the keyboard input).</li>
<li>Finally, the last line tells us the type of error (<span style="font-family: Courier New,monospace;">NameError</span>), 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 <span style="font-family: Courier New,monospace;">unittest</span> that allows one to do something called &#8220;Unit Testing&#8221;. This is a very popular to check for errors in Python programmnig.  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 border="1">
<tbody>
<tr>
<th>Error Type</th>
<th>Description</th>
</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>
</tbody>
</table>
<p>In Python exceptions can be intercepted quite easily. The way this is done is by the try/except/else construct. For example:<br />
<code language="python"><br />
&gt;&gt;&gt; try:</code></p>
<p><code language="python">...     print something</code></p>
<p><code language="python">... except NameError:</code></p>
<p><code language="python">...     print "You should have defined it first!"</code></p>
<p><code language="python">...</code></p>
<p><code language="python">You should have defined it first!<br />
</code><br />
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:<br />
<code language="python"><br />
&gt;&gt;&gt; try:</code></p>
<p><code language="python">...     numb1 = int(raw_input("Type a number"))</code></p>
<p><code language="python">... except ValueError:</code></p>
<p><code language="python">...     print "You should have typed a number."</code></p>
<p><code language="python">... else:</code></p>
<p><code language="python">...     print "Good job %i is a number." %(numb1)<br />
</code><br />
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:<br />
<span style="font-family: Courier New,monospace;"><br />
try:</span></p>
<p><span style="font-family: Courier New,monospace;"> </span></p>
<p><span style="font-family: Courier New,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;try:</span></p>
<p><span style="font-family: Courier New,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;statements&#62;</span></p>
<p><span style="font-family: Courier New,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;finally:</span></p>
<p><span style="font-family: Courier New,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;statements&#62;</span></p>
<p><span style="font-family: Courier New,monospace;">except:</span></p>
<p><span style="font-family: Courier New,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&#60;statements&#62;<br />
</span><br />
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&#8217;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&#8217;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"></a></p>
<h2>Other common built-in functions</h2>
<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>Note:<br />
To see a list of all the built-in functions in the Python core use this command: <span style="font-family: Courier New,monospace;">dir(__builtins__)</span></p>
<p>Let&#8217;s first look at the len 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:<br />
<code language="python"><br />
&gt;&gt;&gt; L = [1, 2, 3, 4]</code></p>
<p><code language="python">&gt;&gt;&gt; len(L)</code></p>
<p><code language="python">4<br />
</code><br />
So, as you can imagine, the len function is very useful when dealing with sequences. For example, we could use it like this in a script:<br />
<code language="python"><br />
#Script to process a Social Security Number</code></p>
<p><code language="python">ssn = ""</code></p>
<p><code language="python">while not ssn:     #Empty strings evaluate to false.</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;ssn = raw_input("Enter your Social Security Number: ")</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;ssn = ssn.replace("-", "") #Eliminate the dashes, if present.</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;if len(ssn) != 9:     #Checks the number of digits.</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print "This is an invalid number."</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print "Try again please."</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssn = "" &nbsp;&nbsp;&nbsp;&nbsp;#Set ssn to false</code></p>
<p><code language="python">print "Your Social Security Number is: " + ssn<br />
</code><br />
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 range function. This function is used to create a list of successively higher numbers. It&#8217;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:<br />
<code language="python"><br />
&gt;&gt;&gt; range(5)     #One parameter, returns list of numbers from 0 to n-1.</code></p>
<p><code language="python">[0, 1, 2, 3, 4]</code></p>
<p><code language="python">&gt;&gt;&gt; range(2, 5)     #First parameter is lower bound.</code></p>
<p><code language="python">[2, 3, 4]</code></p>
<p><code language="python">&gt;&gt;&gt; range(0, 10, 2)     #Third parameter provides a step.</code></p>
<p><code language="python">[0, 2, 4, 6, 8]<br />
</code><br />
To use this in a for loop you can do something like:<br />
<code language="python"><br />
def doit():</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;print "Done it."</code></p>
<p><code language="python">num=int(raw_input("How many times do you want to do this? "))</code></p>
<p><code language="python">for i in range(num):</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;doit()<br />
</code><br />
This little script will simply execute the doit function however many times the user requests. So, if we execute it from the command line, it will look something like:<br />
<code language="python"><br />
/home/me/MyDocs&gt; python test.py</code></p>
<p><code language="python">How many times do you want to do this? 4</code></p>
<p><code language="python">Done it.</code></p>
<p><code language="python">Done it.</code></p>
<p><code language="python">Done it.</code></p>
<p><code language="python">Done it.<br />
</code><br />
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:<br />
<code language="python">&gt;&gt;&gt; type(5)</code><br />
<code language="python">&#60;type 'int'&#62;<br />
</code></p>
<p><code language="python">&gt;&gt;&gt; type('5')</code><br />
<code language="python">&#60;type 'string'&#62;<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&#8217;s say that we wanted to write a function that displays the methods available to a certain object. Let&#8217;s first create a class with one variable and one method:<br />
<code language="python"><br />
&gt;&gt;&gt; class Obj:</code></p>
<p><code language="python">...     def __init__(self):     #This is a special method that runs when instances are created.</code></p>
<p><code language="python">...         self.data = 1     #In this case it just initializes a variable to 1</code></p>
<p><code language="python">...     def add(self, num):     #This is a method that will be available to our instances.</code></p>
<p><code language="python">...          self.data = self.data + num<br />
</code><br />
Now, let&#8217;s create an instance object based on this class:<br />
<code language="python"><br />
&gt;&gt;&gt; ob = Obj()</code></p>
<p><code language="python">&gt;&gt;&gt; ob.data</code></p>
<p><code language="python">1</code></p>
<p><code language="python">&gt;&gt;&gt; ob.add(2)</code></p>
<p><code language="python">&gt;&gt;&gt; ob.data</code></p>
<p><code language="python">3</code></p>
<p><code language="python">&gt;&gt;&gt; dir(ob)</code></p>
<p><code language="python">['data']</code></p>
<p><code language="python">&gt;&gt;&gt; ob.__dict__</code></p>
<p><code language="python">{'data': 3}<br />
</code><br />
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&#8217;s create a function that lets us know what methods are available to our homemade objects.<br />
<code language="python"><br />
import types</code></p>
<p><code language="python">def find_methods(instance):</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;clss = instance.__class__ &nbsp;&nbsp;#We find the class object of the instance</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;methods = []</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;for name in dir(clss):     #Get the named items from the class object</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attribute = clss.__dict__[name] #Get the value of items from the __dict__</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if type(attribute) == types.FunctionType:     #is it a function</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;methods.append(attribute)</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;return methods<br />
</code><br />
Now, we can use this function to find the methods in our little object:<br />
<code language="python"><br />
&gt;&gt;&gt; find_methods(ob)</code></p>
<p><code language="python">[&#60;function __init__ at 007CCD7C&#62; , &#60;function add at 007CC87C&#62;]<br />
</code><br />
Note:<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.</p>
<p>Well as we said before, time is precious. So, why don&#8217;t we finish this part of the tutorial looking at the time module.</p>
<p><a name="Time"></a></p>
<h2>Time</h2>
<p>Computers perform time calculations in reference to an &#8220;epoch&#8221; (like a pivot date). In the Unix family of operating systems the &#8220;epoch&#8221; 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 &#8220;epoch&#8221;. Here is how you do it:<br />
<code language="python"><br />
&gt;&gt;&gt; import time</code></p>
<p><code language="python">&gt;&gt;&gt; time.time()</code></p>
<p><code language="python">1006015080.406<br />
</code><br />
Not very easy to read. However, other functions allow us to manipulate this output with ease. For example the localtime function.<br />
<code language="python"><br />
&gt;&gt;&gt; time.localtime(time.time())</code></p>
<p><code language="python">(2001, 11, 17, 11, 40, 37, 5, 321, 0)<br />
</code><br />
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&#8217;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).<br />
<code language="python"><br />
class Timer:</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;def __init__(self):<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.start_time = time.time()</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;def cur_time(self):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;now = time.time()</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tt=time.localtime(now)</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if tt[3] &gt; 12:</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hr = int(tt[3]) - 12</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ampm = 'p.m.'</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else:</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hr = int(tt[3])</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ampm = 'a.m.'</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ct = "%s:%s:%s %s %s/%s/%s" %(str(hr), tt[4], tt[5], ampm, tt[1], tt[2], tt[0])</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ct</code></p>
<p><code language="python">&nbsp;&nbsp;&nbsp;&nbsp;def elapsed(self):</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;now = time.time()</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;minutes  =(now - self.start_time) / 60</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;secs = (now - self.start_time) % 60     #The remainder of the division</code><br />
<code language="python">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 'Elapsed: %s min %s sec' % (int(minutes), int(secs))<br />
</code><br />
If we save that into a file called timer.py we can then import it into any of our programs. Let&#8217;s import it into the Python Command Line to play with it a little.<br />
<code language="python"><br />
&gt;&gt;&gt; import timer</code></p>
<p><code language="python">&gt;&gt;&gt; mytimer = timer.Timer()<br />
</code><br />
As soon as the instance is created it records the time in the start_time variable. We can verify that like this:<br />
<code language="python"><br />
&gt;&gt;&gt; mytimer.start_time</code></p>
<p><code language="python">1006016982.671<br />
</code><br />
Now let&#8217;s check the current time.<br />
<code language="python"><br />
&gt;&gt;&gt; mytimer.cur_time()</code></p>
<p><code language="python">'12:10:49 a.m. 11/17/2001'<br />
</code><br />
And finally, check how much time has elapsed since the instance was created.<br />
<code language="python"><br />
&gt;&gt;&gt; mytimer.elapsed()</code></p>
<p><code language="python">'Elapsed: 1 min 38 sec'<br />
</code><br />
Well, that is it for this section. It didn&#8217;t take too much time now did it? <img src='http://www.themaemo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </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&#8217;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.  Just leave us a note and tell us how to contact you.  Happy coding to all.<img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=214&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/python-for-newbies-part-two/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>N900 Support Page Online</title>
		<link>http://www.themaemo.com/n900-support-page-online/</link>
		<comments>http://www.themaemo.com/n900-support-page-online/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:09:01 +0000</pubDate>
		<dc:creator>Siraj</dc:creator>
				<category><![CDATA[Device]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo browser]]></category>
		<category><![CDATA[maemo ram limit]]></category>
		<category><![CDATA[maemo review]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[n900 camera]]></category>
		<category><![CDATA[n900 expansion slot]]></category>
		<category><![CDATA[n900 faq]]></category>
		<category><![CDATA[n900 fm]]></category>
		<category><![CDATA[n900 fm transmitter]]></category>
		<category><![CDATA[n900 ovistore]]></category>
		<category><![CDATA[n900 softwares]]></category>
		<category><![CDATA[n900 speakers]]></category>
		<category><![CDATA[n900 support]]></category>
		<category><![CDATA[n900 techspecs]]></category>
		<category><![CDATA[n900 thickness]]></category>
		<category><![CDATA[n900 tips]]></category>
		<category><![CDATA[n900 updater]]></category>
		<category><![CDATA[n900 user manual]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=135</guid>
		<description><![CDATA[

Hi the N900 support page is finally online.Whats the support page brings us:
-User Manual in all languages
-How To which is used for basic tweaks you can do in N900
-Softwares from Nokia for your N900
-Accessories Available for your N900
-Specification
-Simple 400 FAQ&#8217;s

N900 Support Page

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fn900-support-page-online%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fn900-support-page-online%2F" height="61" width="51" /></a></div>
<p><img class="alignnone" src="http://i49.tinypic.com/idgbyb.jpg" alt="" width="414" height="229" /><br />
Hi the N900 support page is finally online.Whats the support page brings us:<br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/guides"><strong>User Manual</strong> in all languages</a><br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/how-to">How To which is used for basic tweaks you can do in N900</a><br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/software">Softwares from Nokia for your N900</a><br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/accessories">Accessories Available for your N900</a><br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/specifications">Specification</a><br />
-<a href="http://europe.nokia.com/get-support-and-software/product-support/n900/faq">Simple 400 FAQ&#8217;s</a><br />
<a href="http://europe.nokia.com/get-support-and-software/product-support/n900"><br />
N900 Support Page<br />
</a><img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=135&#038;type=feed" alt="" />
<p style="text-align: center;"><a href="http://www.directphoneshop.co.uk/coming-soon-mobile-phones.asp">Latest Mobile Phones 2010</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/n900-support-page-online/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>N900 FM transmitter Demo</title>
		<link>http://www.themaemo.com/n900-fm-transmitter-demo/</link>
		<comments>http://www.themaemo.com/n900-fm-transmitter-demo/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 16:53:01 +0000</pubDate>
		<dc:creator>Siraj</dc:creator>
				<category><![CDATA[Device]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo review]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[n900 camera]]></category>
		<category><![CDATA[n900 car stereo]]></category>
		<category><![CDATA[n900 fm]]></category>
		<category><![CDATA[n900 fm transmitter]]></category>
		<category><![CDATA[n900 fm transmitter demo]]></category>
		<category><![CDATA[n900 key tips]]></category>
		<category><![CDATA[n900 keyboard shortcuts]]></category>
		<category><![CDATA[n900 maemo]]></category>
		<category><![CDATA[n900 speakers.n900 expansion slot]]></category>
		<category><![CDATA[n900 thickness]]></category>
		<category><![CDATA[n900 tips]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=131</guid>
		<description><![CDATA[
FM Transmitter Demo
Hi geeks we all know N900 sports a fm transmitter.The N900 fmtransmitter is demoed by Steffen, a member of the Maemo 5 UI Team.The Fm transmitter is basically used to transmit the audio from N900 to the nearby Fm receiver.Here in this below video you can see the working of it.

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fn900-fm-transmitter-demo%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fn900-fm-transmitter-demo%2F" height="61" width="51" /></a></div>
<p><strong>FM Transmitter Demo</strong><br />
Hi geeks we all know N900 sports a fm transmitter.The N900 fmtransmitter is demoed by Steffen, a member of the Maemo 5 UI Team.The Fm transmitter is basically used to transmit the audio from N900 to the nearby Fm receiver.Here in this below video you can see the working of it.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/n99S8iMYKRY&#038;rel=0&#038;color1=0xd6d6d6&#038;color2=0xf0f0f0&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/n99S8iMYKRY&#038;rel=0&#038;color1=0xd6d6d6&#038;color2=0xf0f0f0&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p><img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=131&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/n900-fm-transmitter-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nokia&#8217;s Maemo OS &#8211; The next big wave</title>
		<link>http://www.themaemo.com/nokias-maemo-os-the-next-big-wave/</link>
		<comments>http://www.themaemo.com/nokias-maemo-os-the-next-big-wave/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 21:57:38 +0000</pubDate>
		<dc:creator>rm42</dc:creator>
				<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900 maemo]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=58</guid>
		<description><![CDATA[Trends in computers come in waves.  Developers are like surfers on the shore spying out the horizon looking out for the next big one.  Today I write about a wave that is just now starting to take shape, looks almost innocuous, but that has the potential to be a great ride as well - Nokia's Maemo operating system.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fnokias-maemo-os-the-next-big-wave%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fnokias-maemo-os-the-next-big-wave%2F" height="61" width="51" /></a></div>
<div class="wp-caption alignnone" style="width: 433px"><img title="The next big wave" src="http://msnbcmedia1.msn.com/j/msnbc/Components/Photos/041216/041216_hawaii_hmed_4a.h2.jpg" alt="The next big wave" width="423" height="254" />
<p class="wp-caption-text">The next big wave</p>
</div>
<p>Trends in computers come in waves.  Developers are like surfers on the shore spying out the horizon looking out for the next big one.  Today I write about a wave that is just now starting to take shape, looks almost innocuous, but that has the potential to be a great ride as well &#8211; Nokia&#8217;s Maemo operating system.</p>
<p>There have been several Maemo based devices released already, but the latest one, <a href="http://temporaryland.wordpress.com/2009/10/09/nokian900-not-just-an-itoy/">the N900</a> seems to be really capturing the imagination of lots and lots of users and, in particular, developers.  And that is very significant, even crucial for a platform, as Steve Ballmer has been known to admit.  But aren&#8217;t all mobile device developers already coding for Apple?  Well, they might have been, and a great many of them still are, but that wave seems to be heading in to the <a href="http://www.computerworld.com/s/article/9141222/iPhone_owners_demand_to_see_Apple_source_code">rocks</a> and <a href="http://www.paulgraham.com/apple.html">many of its riders are looking to get off</a>.  OK, you may say, but aren&#8217;t developers more likely to get on the Google Android wave instead?  Well, some have already done just that, but I have reason to believe that the Maemo wave is going to be a lot more fun to ride.  Lets see why.<span id="more-58"></span></p>
<p>In case you didn&#8217;t follow the links above, Paul Graham wrote an excellent essay entitled “<a href="http://www.paulgraham.com/apple.html">Apple&#8217;s Mistake</a>”.  I do encourage you to read it.  On that essay Mr. Graham provides a very insightful appraisal of the current situation with lots of iPhone developers.  To sum it up, they are frustrated with Apple&#8217;s heavy handed treatment and are looking for an alternative.  He considers Android as lacking what it takes to really grab a hold of the mass of developers fancy.  Sure, some Apple developers have jumped to it, but he thinks many are going to just hold tight and let that wave go by hoping for a better one.</p>
<p>So, what does Mr. Graham envision as a worthy wave to entice developers into riding it (or writing for it, if you prefer)?  Well, lets take a look:</p>
<ol>
<li> The device has to be desirable as a personal device for the programmer himself.<br />
I think that this is where Android has failed so far.  Just about all of the Android devices that have been released so far have been lacking the awesomeness needed to entice developers away from their beloved iPhones.  They either felt cheap in comparison with the excellent build quality of the iPhone, were lacking in storage space, were lacking in processing speed, were lacking in application memory, etc., or all of the above.</li>
<li>It would have something very appealing specifically to developers.<br />
As he says: “If you could think of an application programmers had to have, but that would be impossible in the circumscribed world of the iPhone, you could presumably get them to switch.”  And what may such an application be?  Thankfully, he is kind enough to tell us. “Could anyone make a device that you&#8217;d carry around in your pocket like a phone, and yet would also work as a development machine? It&#8217;s hard to imagine what it would look like.”</li>
</ol>
<p>Well, I would love to see what Mr. Graham&#8217;s reaction is going to be when he realizes that such a device already exists and is starting to reach the masses of impatient customers right now.  Not only is the N900 very appealing hardware and software wise, but it also happens to have that ability that, so far, has only been a twinkle in his eye – the ability of using your phone as a developer device.  I will write more about this on a separate post.</p>
<p>I believe that even Nokia has been taken by surprise by the interest this device has generated.  Hundreds of people have been glued to their computers following with obsessive interest the Maemo forums looking for clues as to when they are finally going to be having the device on their hands.  I know that there have been people known to camp out overnight outside of Apple&#8217;s stores on the eve of a new iPhone launch.  But, what has been happening surrounding the launch of the N900 is truly an event worthy of study by sociologist.  Take a look if you want at some of the “monster threads” that have been brewing over at the Maemo forums.</p>
<p><a href="http://talk.maemo.org/showthread.php?t=33153">Did your N900 ship today continued</a> (838 replies at time of writing)</p>
<p><a href="http://talk.maemo.org/showthread.php?t=33313">N900 shipping delayed</a> (3,930 replies at time of writing)</p>
<p><a href="http://talk.maemo.org/showthread.php?t=34183">OPK: N900 deliveries have now started!!</a> (2,513 replies at time of writing)</p>
<div id="attachment_59" class="wp-caption alignnone" style="width: 410px"><img class="size-full wp-image-59" title="Can you say mass obsession?" src="http://www.themaemo.com/wp-content/uploads/2009/11/crowd.jpg" alt="Can you say mass obsession?" width="400" height="350" />
<p class="wp-caption-text">Can you say mass obsession?</p>
</div>
<p>In my view, the Nokia N900 is shaping up to be the beginning of a very interesting ride for many mobile developers, and for many developers that were previously not interested in mobile computing.  And for the regular users?  Well, they are in for a treat with all the apps that are going to be developed for this device.  And I am not talking of simple unit converters, shopping list programs, car fuel consumption trackers, etc.  I believe that the level of sophistication and power of the applications that are going to become available for the N900 will be rivaled by no other phone type device in existence.  Don&#8217;t believe me?  Well, feel free to skip this wave.  But as for me, got to go, surf is up.<img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=58&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/nokias-maemo-os-the-next-big-wave/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to take the Red-Pill and install more apps on the N900</title>
		<link>http://www.themaemo.com/taking-the-red-pill/</link>
		<comments>http://www.themaemo.com/taking-the-red-pill/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 16:28:17 +0000</pubDate>
		<dc:creator>archebyte</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo review]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/taking-the-red-pill/</guid>
		<description><![CDATA[
The N900 (and the Maemo platform) allows the user to, for lack of a better word, &#8220;turbo-charge&#8221; the Application Manager by opening up a variety of advanced features locked away by default.  Enabling them requires taking the &#8220;Red-Pill&#8221; so to speak. you can always opt for the &#8220;Blue-Pill&#8221; but c&#8217;mon, you only live once. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Ftaking-the-red-pill%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Ftaking-the-red-pill%2F" height="61" width="51" /></a></div>
<p>The N900 (and the Maemo platform) allows the user to, for lack of a better word, &#8220;turbo-charge&#8221; the Application Manager by opening up a variety of advanced features locked away by default.  Enabling them requires taking the &#8220;Red-Pill&#8221; so to speak. you can always opt for the &#8220;Blue-Pill&#8221; but c&#8217;mon, you only live once. <img src='http://www.themaemo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, to enable this mode, open the Application Manager and select Catalogs from the drop-down. This will show a list of catalogs</p>
<div style="text-align:center"><img src="http://www.themaemo.com/wp-content/uploads/2009/11/XEdWEkJh.jpg" alt="" /></div>
<p>Tap &#8220;New&#8221; and type the word matrix in the &#8216;Web address&#8217; field.</p>
<div style="text-align:center"><img src="http://www.themaemo.com/wp-content/uploads/2009/11/LHwePpft.jpg" alt="" /></div>
<p>Now tap on the blurry region above the Catalogs window. This will bring up the &#8220;big choice&#8221;</p>
<div style="text-align:center"><img src="http://www.themaemo.com/wp-content/uploads/2009/11/uQIVhilK.jpg" alt="" /></div>
<p>Taking the Blue-Pill will put you back where you started. Taking the Red-Pill will unlock the new world and the Application Catalog will display new buttons like &#8216;Settings&#8217; and &#8216;Install from File&#8217;</p>
<div style="text-align:center"><img src="http://www.themaemo.com/wp-content/uploads/2009/11/oyAFNqpV.jpg" alt="" /></div>
<p>The Application Manager will now update if an internet-connection is available and display a whole lot more packages. These packages are not only useful for development purposes but also for advanced use.</p>
<p><span style="color: #ff0000;">NOTE</span>: <em>Just a word of caution. Enable this mode only if you feel comfortable with managing the advanced features. The chances of getting your phone bricked are high if you don&#8217;t know what you are doing. If you are willing to take the risk, good luck!</em><img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=50&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/taking-the-red-pill/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>why the heck Nokia N900 is so thick ?</title>
		<link>http://www.themaemo.com/why-the-hell-nokia-n900-is-so-thick/</link>
		<comments>http://www.themaemo.com/why-the-hell-nokia-n900-is-so-thick/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 18:13:30 +0000</pubDate>
		<dc:creator>Siraj</dc:creator>
				<category><![CDATA[Devices]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo ram limit]]></category>
		<category><![CDATA[maemo review]]></category>
		<category><![CDATA[n900 camera]]></category>
		<category><![CDATA[n900 maemo]]></category>
		<category><![CDATA[n900 speakers.n900 expansion slot]]></category>
		<category><![CDATA[n900 stylus]]></category>
		<category><![CDATA[n900 thickness]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=24</guid>
		<description><![CDATA[
In our last post we saw how powerful Nokia N900 was, now the question is why is the Nokia N900 so thick ?


You would wonder why the N900 is so thick compared to other mobiles such as HD2 and the famous iPhone 3GS.
lets see why.. It is due to following additions to the beast and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fwhy-the-hell-nokia-n900-is-so-thick%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fwhy-the-hell-nokia-n900-is-so-thick%2F" height="61" width="51" /></a></div>
<p>In our <a href="../nokia-n900-maemo-beast-dragged-to-its-limit/">l</a>ast pos<a href="../nokia-n900-maemo-beast-dragged-to-its-limit/">t</a> we saw <a href="../nokia-n900-maemo-beast-dragged-to-its-limit/">how powerful Nokia N900</a> was, now the question is why is the Nokia N900 so thick ?</p>
<p style="text-align: center;"><img class="aligncenter" src="http://i50.tinypic.com/28v678m.jpg" alt="" width="554" height="416" /></p>
<p style="text-align: center;">
<p>You would wonder why the N900 is so thick compared to other mobiles such as HD2 and the famous iPhone 3GS.</p>
<p>lets see why.. It is due to following additions to the beast and making it a powerful contender to all the mobiles.</p>
<p><span id="more-24"></span></p>
<p>*<strong>Stereo Speakers</strong> &#8211; High Quality stereo speakers.It delivers the sound as the way it was supposed to be delivered.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/TquCVQNVQqg&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/TquCVQNVQqg&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
*<strong>Expansion Slot</strong>- The Monster can utilize extra memory too if you like so, expansion slot is a must.</p>
<p>*<strong>Full QWERTY</strong> &#8211; Touch screen + QWERTY always a Great combo for a phone like this and the slider takes more room to be perfectly slide out</p>
<p>You might ask why Motorola DROID which also has a QWERTY keyboard and it is slightly thiner..that is because DROID keyboard is FLAT, it is not the case in the N900 which has tactile keyboard with curved buttons.<br />
*<strong>IR</strong> &#8211; Can be used as universal remote, there is already an app for that.<br />
<img src="http://img23.imageshack.us/img23/1373/nokian900back01.jpg" alt="" /></p>
<p>* <strong>5 mpx</strong> &#8211; bigger sensor , lens cover , kick stand, dual LED  &#8211; These spice up the photo output of the beast. Kick Stand makes it a handy video player.</p>
<p>*<strong>Removable battery</strong> &#8211; The power house of the Beast BL-5J 1320mAh take some room in the device.<br />
*<strong>Stylus</strong> &#8211; The stylus is a complementary thing in resistive screen we will need in some time.So some thickness is given to it to fit firmly.<br />
*<strong>Integrated 32GB </strong>- The memory really speaks out for this phone<br />
*<strong>FM transmitter and Receiver , TV-out chip</strong> -The hardware things which spice up the N900 a little more outstanding device<br />
*<strong>Front camera</strong> for Video Calls-A must for all high-end Mobile phone . oh by the way now we can do Skype Video calls  <img src='http://www.themaemo.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>More hardware feature <code>=</code> bigger the size , its inevitable.<img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=24&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/why-the-hell-nokia-n900-is-so-thick/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Nokia N900 Maemo Beast dragged to its Limit</title>
		<link>http://www.themaemo.com/nokia-n900-maemo-beast-dragged-to-its-limit/</link>
		<comments>http://www.themaemo.com/nokia-n900-maemo-beast-dragged-to-its-limit/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 17:30:07 +0000</pubDate>
		<dc:creator>Siraj</dc:creator>
				<category><![CDATA[Device]]></category>
		<category><![CDATA[Devices]]></category>
		<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[maemo ram limit]]></category>
		<category><![CDATA[maemo review]]></category>
		<category><![CDATA[n900 maemo]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[nokia n900]]></category>

		<guid isPermaLink="false">http://www.themaemo.com/?p=9</guid>
		<description><![CDATA[
Hi all As we all know the Nokia N900 is a Great multitasking beast with 1gb application memory. Here in this video, archbyte from  TheMaemo.com team  pushes the N900 to its limits check out the cool video from him.



Also a video from Nokia here:

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.themaemo.com%2Fnokia-n900-maemo-beast-dragged-to-its-limit%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.themaemo.com%2Fnokia-n900-maemo-beast-dragged-to-its-limit%2F" height="61" width="51" /></a></div>
<p style="text-align: left;">Hi all As we all know the Nokia N900 is a Great multitasking beast with 1gb application memory. Here in this video, <span style="color: #0000ff;">archbyte</span> from  <a href="http://www.themaemo.com"><span style="color: #0000ff;">TheMaemo.com</span></a> team  pushes the N900 to its limits check out the cool video from him.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/0naeSt9BTFY&amp;color1=0x234900&amp;color2=0xd4d4d4&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/0naeSt9BTFY&amp;color1=0x234900&amp;color2=0xd4d4d4&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p style="text-align: center;"><span id="more-9"></span></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/URsNHguzHoI&amp;color1=0x234900&amp;color2=0xd4d4d4&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/URsNHguzHoI&amp;color1=0x234900&amp;color2=0xd4d4d4&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p style="text-align: center;"><strong>Also a video from Nokia here:</strong></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/-t9Qw2sU-WE&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/-t9Qw2sU-WE&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><img src="http://www.themaemo.com/?ak_action=api_record_view&#038;id=9&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.themaemo.com/nokia-n900-maemo-beast-dragged-to-its-limit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
