<?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>nazham.com &#187; Python</title>
	<atom:link href="http://nazham.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://nazham.com</link>
	<description>Jarvis, sometimes you gotta run before you can walk.</description>
	<lastBuildDate>Tue, 01 Jun 2010 06:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Enhance Your Linux Desktop with Conky</title>
		<link>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/</link>
		<comments>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 15:35:29 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=1000</guid>
		<description><![CDATA[I have been using Conky as my desktop monitoring widgets for quite some time now. Before this, I&#8217;ve been using few applications like screenlets and gdesklets, but there&#8217;s a lot of drawbacks on these applications. Among them were limited customizations, it&#8217;s difficult to develop your own widgets, unable to find widgets you&#8217;re looking for, and [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I have been using <strong>Conky</strong> as my desktop monitoring widgets for quite some time now. Before this, I&#8217;ve been using few applications like screenlets and gdesklets, but there&#8217;s a lot of drawbacks on these applications. Among them were limited customizations, it&#8217;s difficult to develop your own widgets, unable to find widgets you&#8217;re looking for, and if you do find them, they are too buggy to be used in the first place.</p>
<p>Then, I&#8217;ve found <a href="http://conky.sourceforge.net/">Conky</a>. I&#8217;ll never turn back.</p>
<p>This is the best system monitor I have ever experienced. It is highly customizable, all you have to do is modify the Conky config file. There&#8217;s a lot of widgets/variables to use, such as system monitoring tools (CPU, RAM, SWAP, Hard Drive, etc), batteries capacity, networking, and more. And best of all, it is very, very easy to create your own widgets. If you know any programming language such as Python, Perl, or even a simple Shell Scripts, then you&#8217;re off to create your own.</p>
<p><span id="more-1000"></span><br />
Installing Conky are easy as executing command below in the terminal:<br />
<code>$ sudo apt-get install conky</code></p>
<p>Next, create your Conky config file. Here is <a href="http://nazham.com/download/conky.conf.txt" target="_blank">my config file</a> I&#8217;m currently using.</p>
<p>Then, execute command below to run Conky. Put it in your startup so that it will be running each time you boot-up your computer:<br />
<code>$ conky -c &lt;path_to_my_conky_config&gt;.conf</code></p>
<p>Below are what my desktop currently looks like with Conky:</p>
<div id="attachment_1007" class="wp-caption aligncenter" style="width: 310px"><a href="http://nazham.com/wp-content/uploads/2009/07/conky-desktop.png"><img class="size-medium wp-image-1007" title="Conky Desktop" src="http://nazham.com/wp-content/uploads/2009/07/conky-desktop-300x187.png" alt="Conky Desktop" width="300" height="187" /></a><p class="wp-caption-text">Conky Desktop</p></div>
<p>In there I&#8217;ve created my own GMail notifier, Google Reader notifier and local TV guide, all using Python. You will find more ideas, screen shots and scripts to use with Conky on <a href="http://ubuntuforums.org/showthread.php?t=281865" target="_blank">Ubuntu Forum</a>.</p>
<p>Cheers.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2009%2F07%2F26%2Fhow-to-enhance-your-linux-desktop-with-conky%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2009/07/26/how-to-enhance-your-linux-desktop-with-conky/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Python: Executing a Program on a Remote 64-bit Windows Machine</title>
		<link>http://nazham.com/2008/12/17/python-executing-a-program-on-a-remote-64-bit-windows-machine/</link>
		<comments>http://nazham.com/2008/12/17/python-executing-a-program-on-a-remote-64-bit-windows-machine/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 07:52:43 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=628</guid>
		<description><![CDATA[Executing a program, exe&#8217;s, services on a remote Windows machine can be accomplished very easily, with a very few lines of code in Python. The task is similar to Psexec. However, in Python, one of the ways is using Windows Management Instrumentation (WMI).
From Tim Golden&#8217;s Python Stuff:
Windows Management Instrumentation (WMI) is Microsoft&#8217;s implementation of Web-Based Enterprise Management [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Executing a program, exe&#8217;s, services on a remote Windows machine can be accomplished very easily, with a very few lines of code in Python. The task is similar to <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx" target="_blank">Psexec</a>. However, in Python, one of the ways is using Windows Management Instrumentation (WMI).</p>
<p>From <a href="http://timgolden.me.uk/python/wmi.html" target="_blank">Tim Golden&#8217;s Python Stuff</a>:</p>
<blockquote><p>Windows Management Instrumentation (WMI) is Microsoft&#8217;s implementation of Web-Based Enterprise Management (WBEM), an industry initiative to provide a Common Information Model (CIM) for pretty much any information about a computer system.</p></blockquote>
<p>Executing remote program using WMI needs the <a href="http://starship.python.net/crew/mhammond/" target="_blank">win32 extensions from Mark Hammond</a>. Below are one of the sample code that I&#8217;ve used on a 32-bit target machine:</p>
<pre>c = wmi.WMI ('my_remote_windows_machine')
process_id, result = c.Win32_Process.Create (CommandLine="Notepad.exe")
    for process in c.Win32_Process (ProcessId=process_id):
        returnvalue = str(process.ProcessId) + " " + str(process.Name)

    if result == 0:
        returnvalue = "Process started successfully: %s" % returnvalue
    else:
        raise RuntimeError, "Problem creating process: %s" % str(result)
    print returnvalue</pre>
<p> </p>
<p>However, when it comes to 64-bit target machines, I&#8217;m getting errors below:</p>
<pre>  File "C:\Python26\lib\wmi.py", line 1181, in connect
    return _wmi_namespace (obj, find_classes)
  File "C:\Python26\lib\wmi.py", line 821, in __init__
    self.classes.update (self.subclasses_of ())
  File "C:\Python26\lib\wmi.py", line 843, in subclasses_of
    for c in self._namespace.SubclassesOf (root):
  File "C:\Python26\Lib\site-packages\win32com\client\util.py", line 84, in next

    return _get_good_object_(self._iter_.next(), resultCLSID = self.resultCLSID)</pre>
<p> </p>
<p><strong>The solution:</strong></p>
<pre>c = wmi.WMI ('my_remote_windows_machine', find_classes=False)
process_id, result = c.Win32_Process.Create (CommandLine="Notepad.exe")
    for process in c.Win32_Process (ProcessId=process_id):
        returnvalue = str(process.ProcessId) + " " + str(process.Name)

    if result == 0:
        returnvalue = "Process started successfully: %s" % returnvalue
    else:
        raise RuntimeError, "Problem creating process: %s" % str(result)
    print returnvalue</pre>
<p>Notice the extra parameter <strong>find_classes=False</strong> when instantiating the WMI object.<br />
Some of the good examples on WMI in Python:<br />
<a href="http://timgolden.me.uk/python/wmi.html" target="_blank">Tim Golden&#8217;s Python Stuff</a><br />
<a href="http://timgolden.me.uk/python/wmi_cookbook.html" target="_blank">WMI Cookbook</a></p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2008%2F12%2F17%2Fpython-executing-a-program-on-a-remote-64-bit-windows-machine%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2008/12/17/python-executing-a-program-on-a-remote-64-bit-windows-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Programming Language</title>
		<link>http://nazham.com/2008/11/28/nazham-python-the-programming-language/</link>
		<comments>http://nazham.com/2008/11/28/nazham-python-the-programming-language/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 14:44:00 +0000</pubDate>
		<dc:creator>nazham</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://nazham.com/?p=553</guid>
		<description><![CDATA[It has been almost a month now since I&#8217;ve started application development in Python. Before this, I&#8217;ve already started playing with it in my spare time. (Yeah, instead of doing important stuff like mowing the lawn, fixing the light bulb, or playing with my children, I&#8217;ve decided to learn a new programming language! I really [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>It has been almost a month now since I&#8217;ve started application development in <a href="http://www.python.org/" target="_blank">Python</a>. Before this, I&#8217;ve already started playing with it in my spare time. (Yeah, instead of doing important stuff like mowing the lawn, fixing the light bulb, or playing with my children, I&#8217;ve decided to learn a new programming language! I really need to set my priorities straight).</p>
<p>Before this my encounter with Python is merely just a few samples, consists of some web forms and web pages, using <a href="http://www.modpython.org/" target="_blank">mod_python</a> configured on <a href="http://www.apache.org/" target="_blank">Apache</a> running on my headless <a href="http://www.centos.org/" target="_blank">CentOS</a> box (VM actually). Run a few queries against <a href="http://www.mysql.com/" target="_blank">MySQL</a> using <a href="http://sourceforge.net/projects/mysql-python" target="_blank">MySQLdb</a> module, returns a few results, display it on the web apps, and that&#8217;s it! The experience is limited, but enough to learn it&#8217;s syntax and flow.</p>
<p>Now I&#8217;m developing actual program in Python at work. (Finally, something to add to my resume <img src='http://nazham.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). It&#8217;s more of a client-server application, but involves a lot of components and API&#8217;s to get around with. I&#8217;ve been using win32api&#8217;s, win32net, Windows Services, WMI for remote execution, etc, etc. At times I felt my head is going to explode. But, it&#8217;s fun! At least I have something to wake up every morning to.</p>
<p><a href="http://en.wikipedia.org/wiki/Python_(programming_language)" target="_blank">Wiki</a>:</p>
<blockquote><p>Python is a general-purpose, high-level programming language. Its design philosophy emphasizes programmer productivity and code readability. Python&#8217;s core syntax and semantics are minimalistic, while the standard library is large and comprehensive. Its use of whitespace as block delimiters is unusual among popular programming languages.</p>
<p>Python supports multiple programming paradigms (primarily object oriented, imperative, and functional) and features a fully dynamic type system and automatic memory management, similar to Perl, Ruby, Scheme, and Tcl. Like other dynamic languages, Python is often used as a scripting language.</p></blockquote>
<p>Useful Links For Python:<br />
<a href="http://www.awaretek.com/tutorials.html" target="_blank">Python Tutorials</a> (Lots of tutorial, from beginners to advanced)<br />
<a href="http://code.activestate.com/recipes/langs/python/" target="_blank">code.activestate.com</a> (My favorite. Lots of actual running source codes)<br />
<a href="http://www-128.ibm.com/developerworks/library/l-cheatsheet3.html" target="_blank">Python 101 Cheat Sheet</a></p>
<p>IDE of Choice:<br />
<a href="http://www.activestate.com/index.mhtml" target="_blank">Komodo IDE</a><br />
<a href="http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml" target="_blank">Komodo Edit</a> (Free)<br />
<a href="http://www.aptana.com/python" target="_blank">Aptana Pydev</a> (Free)</p>
<p><a href="http://wiki.python.org/moin/OrganizationsUsingPython" target="_blank">Organizations using Python</a>: Yahoo Maps, Yahoo Groups, <a href="http://highscalability.com/google-architecture" target="_blank">Google</a>, <a href="http://highscalability.com/youtube-architecture" target="_blank">YouTube</a></p>
<p>Any experience or opinions on Python? What your IDE of choice? For those who&#8217;re interested, expect more post regarding Python soon. Source codes, samples and more.</p>
<iframe id="basic_facebook_social_plugins_likebutton" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnazham.com%2F2008%2F11%2F28%2Fnazham-python-the-programming-language%2F&amp;layout=standard&amp;show_faces=true&amp;width=&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:px"></iframe>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nazham.com/2008/11/28/nazham-python-the-programming-language/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
