<?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>*drawcode &#187; coding</title>
	<atom:link href="http://blog.drawcode.com/index.php/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.drawcode.com</link>
	<description>creative engineering, design and development</description>
	<lastBuildDate>Sat, 23 May 2009 19:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Python Multi-Platform GUI Frameworks and Libraries for Desktop Applications On Windows, Mac OSX and *nix</title>
		<link>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/</link>
		<comments>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/#comments</comments>
		<pubDate>Sat, 23 May 2009 19:33:56 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wrappers]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=26</guid>
		<description><![CDATA[Python has some good GUI kits for developers looking to make cross platform tools that are fast and rapid to develop. There are some great libraries out there to help you get up to speed very fast. wxPython wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a [...]]]></description>
			<content:encoded><![CDATA[<p>Python has some good GUI kits for developers looking to make cross platform tools that are fast and rapid to develop.  There are some great libraries out there to help you get up to speed very fast.</p>
<h3><span style="font-weight: normal;">wxPython</span></h3>
<p>wxPython is a <strong>GUI toolkit</strong> for the <a href="http://www.python.org/">Python</a> programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular <a href="http://wxwidgets.org/">wxWidgets</a> cross platform GUI library, which is written in C++.</p>
<p>Like Python and wxWidgets, wxPython is <strong>Open Source</strong> which means that it is free for anyone to use and the source code is available for anyone to look at and modify. Or anyone can contribute fixes or enhancements to the project.</p>
<p>wxPython is a <strong>cross-platform</strong> toolkit. This means that the same program will run on multiple platforms without modification. Currently supported platforms are 32-bit Microsoft Windows, most Unix or unix-like systems, and Macintosh OS X.</p>
<ul>
<li><a href="http://www.wxpython.org/">http://www.wxpython.org/</a></li>
</ul>
<h3><span style="font-weight: normal;">pyQT</span></h3>
<p>PyQt is a set of Python bindings for <a href="http://trolltech.com/">Nokia&#8217;s</a> Qt application framework and runs on all platforms supported by Qt including Windows, MacOS/X and Linux. There are two sets of bindings: PyQt v4 supports Qt v4; and the older PyQt v3 supports Qt v3 and earlier. The bindings are implemented as a set of Python modules and contain over 300 classes and over 6,000 functions and methods.</p>
<ul>
<li><a href="http://www.riverbankcomputing.co.uk/software/pyqt/download">http://www.riverbankcomputing.co.uk/software/pyqt/download</a></li>
<li>Supports lots of great libraries such as:
<ul>
<li>
<ul>
<li>The <strong>QtNetwork</strong> module contains classes for writing UDP and TCP clients and servers. It includes classes that implement FTP and HTTP clients and support DNS lookups. Network events are integrated with the event loop making it very easy to develop networked applications.</li>
<li>The <strong>QtOpenGL</strong> module contains classes that enable the use of OpenGL in rendering 3D graphics in PyQt applications.</li>
<li>The <strong>QtWebKit</strong> module implements a web browser engine based on the <a href="http://webkit.org/">WebKit</a> open source browser engine used by Apple&#8217;s Safari. It allows the methods and properties of Python objects to be published and appear as JavaScript objects to scripts embedded in HTML pages.</li>
<li>The <strong>QtScript</strong> module contains classes that enable PyQt applications to be scripted using Qt&#8217;s JavaScript interpreter.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3><span style="font-weight: normal;">PyGTK: GTK+ for Python</span></h3>
<p>PyGTK lets you to <strong>easily create programs with a graphical user interface</strong> using the Python programming language. The underlying GTK+ library provides all kind of visual elements and utilities for it and, if needed, you can develop full featured applications for the GNOME Desktop.</p>
<p>PyGTK applications are truly <strong>multiplatform</strong> and they&#8217;re able to run, unmodified, on Linux, Windows, MacOS X and other platforms.</p>
<ul>
<li><a href="http://www.pygtk.org/">http://www.pygtk.org/</a></li>
</ul>
<h3>Opinion</h3>
<p>My personal opinion is that wxPython is best for many windows developers.  PyQt looks great and has many great libraries, Qt itself is a very fast C++ library so using it is beneficial.  PyGTK is also great but more common for *nix apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a Command From Python, Such as Launching an Application from Python</title>
		<link>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/</link>
		<comments>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/#comments</comments>
		<pubDate>Sat, 23 May 2009 01:31:55 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[popen2]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=21</guid>
		<description><![CDATA[You can call the command to launch applications or run commands in Python two ways. With os.system(my_command) import os os.system&#40;&#34;c:\\windows\\notepad.exe&#34;&#41; Or with popen2.popen3(my_command) import popen2 popen2.popen3&#40;&#34;c:\\windows\\notepad.exe&#34;&#41;]]></description>
			<content:encoded><![CDATA[<p>You can call the command to launch applications or run commands in Python two ways.</p>
<p>With os.system(my_command)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>windows<span style="color: #000099; font-weight: bold;">\\</span>notepad.exe&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Or with popen2.popen3(my_command)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">popen2</span>
<span style="color: #dc143c;">popen2</span>.<span style="color: black;">popen3</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>windows<span style="color: #000099; font-weight: bold;">\\</span>notepad.exe&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>amfast Python Remoting and Services Library for Flash, Flex and other AMF</title>
		<link>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/</link>
		<comments>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/#comments</comments>
		<pubDate>Mon, 18 May 2009 07:21:44 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=19</guid>
		<description><![CDATA[pyamf is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side. amfast is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out amfast now but [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://pyamf.org/" target="_blank">pyamf </a></strong>is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side.</p>
<p><strong><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a></strong>is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out <a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>now but the speed boost alone might be worth it.  For instance, working with real-time games, when you need static content you need to grab that quickly sometimes via a content service.  The faster that link the better. It also has <a href="http://twistedmatrix.com/trac/" target="_blank">Twisted</a> integration which is great for networking and <a href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy </a>integration which is in my opinion the best ORM for python (pyamf has twisted, django, pylons, sqlalchemy as well)</p>
<p><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>is well documented and has some great examples.  If you have the Python addiction, check it.</p>
<blockquote>
<h3><a name="Description">Description</a></h3>
<ul>
<li><a name="Description">AmFast is a Flash remoting framework for Python. </a></li>
<li><a name="Description">AmFast can use AMF to communicate between Python and Flash, Flex, and any other system that supports AMF. </a></li>
<li><a name="Description">AMF is a binary object serialization protocol used by Actionscript based applications. </a></li>
</ul>
<h3><a name="Server_Features">Server Features</a></h3>
<ul>
<li><a name="Server_Features">Support for NetConnection and RemoteObject RPC. </a></li>
<li><a name="Server_Features">Support for Producer/Consumer ‘push’ messaging with HTTP polling, HTTP long-polling, and real-time HTTP streaming channels. </a></li>
<li><a name="Server_Features">Support for authentication with NetConnection and RemoteObject. </a></li>
<li><a name="Server_Features">Flexible Target mapping system to map message destinations to invokable Target objects. </a></li>
<li><a name="Server_Features">Support for ChannelSets with multiple Channels to expose resources in different ways. </a></li>
<li><a name="Server_Features">Built in Channels for </a><a rel="nofollow" href="http://cherrypy.org/">CherryPy</a>, <a rel="nofollow" href="http://twistedmatrix.com/trac/">Twisted Web</a>, and plain WSGI.</li>
<li>Support for configurable Endpoints. Use AmFast’s built-in AMF encoder/decoder C-extension, or use an external AMF encoder/decoder, such as <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> for a pure-Python implementation.</li>
</ul>
<h3><a name="AMF_Encoder/Decoder_Features">AMF Encoder/Decoder Features</a></h3>
<ul>
<li><a name="AMF_Encoder/Decoder_Features">AMF0/AMF3 encoder/decoder written in C as a Python extension for speed. </a></li>
<li><a name="AMF_Encoder/Decoder_Features">More than 10x faster than the </a><a rel="nofollow" href="http://pyamf.org/">PyAmf</a> encoder/decoder (even when using <a rel="nofollow" href="http://pyamf.org/">PyAmf’s</a> optional C-extension).</li>
<li>Map custom classes with ClassDef objects for complete control over serialization/de-serialization.</li>
<li>Full support for IExternalizable objects.</li>
<li>Data persistence with <a rel="nofollow" href="http://www.sqlalchemy.org/">SqlAlchemy</a> including remotely-loadable lazy-loaded attributes.</li>
<li>Actionscript code generation from ClassDef objects.</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Loading Classes in Python using Reflection/Inspection w/ Inspect Module</title>
		<link>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/</link>
		<comments>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:31:58 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[introspection]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=15</guid>
		<description><![CDATA[Python is a dynamic language that you can pretty much use for anything. One area that is pretty common is loading up a dynamic class. Let&#8217;s say you get back a list of classes and you want to initialize one into an object and use it. You can use the script below to load in [...]]]></description>
			<content:encoded><![CDATA[<p>Python is a dynamic language that you can pretty much use for anything.  One area that is pretty common is loading up a dynamic class.  Let&#8217;s say you get back a list of classes and you want to initialize one into an object and use it.  You can use the script below to load in a python class from introspection.</p>
<pre>    classname = "ClassToLookFor"
    the_module = __import__("my.module", globals(), locals(), [classname])
    the_class = getattr(the_module, classname)
    obj = the_class()</pre>
<p>More on introspection in Python (sometimes called Reflection in other languages like C# and Java):</p>
<ul>
<li><a href="http://docs.python.org/library/inspect.html" target="_blank">Python docs on introspection using the inspect module</a></li>
<li><a href="http://www.ibm.com/developerworks/library/l-pyint.html" target="_blank">IBM page on a tour of Python introspection</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
