<?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 Matrix Data Bank &#187; Python</title>
	<atom:link href="http://www.schollnick.net/wordpress/category/computers/programming/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.schollnick.net/wordpress</link>
	<description>Messages from a far away land in the constellation of Kasterborous</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:37:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Renaming 2 thousand Files? Do it the Python way&#8230;</title>
		<link>http://www.schollnick.net/wordpress/2010/10/renaming-2-thousand-files-do-it-the-python-way/</link>
		<comments>http://www.schollnick.net/wordpress/2010/10/renaming-2-thousand-files-do-it-the-python-way/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 12:21:57 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=4530</guid>
		<description><![CDATA[I ran into a situation earlier that I needed to bulk rename the file extension on a couple thousand files&#8230;.
The first hurtle was that a majority of the files had a &#8220;\&#8221;  (or was it &#8220;/&#8221;?) in it.  Since I am on a Unix platform, it appears that the os.listdir function wasn&#8217;t able to see [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I ran into a situation earlier that I needed to bulk rename the file extension on a couple thousand files&#8230;.</p>
<p>The first hurtle was that a majority of the files had a &#8220;\&#8221;  (or was it &#8220;/&#8221;?) in it.  Since I am on a Unix platform, it appears that the os.listdir function wasn&#8217;t able to see those files, since I believe that&#8217;s a reserved character.  These files were originally  created on an OS/2 based computer&#8230;</p>
<p>So I ended up using <a href="http://web.mac.com/mickeyroberson/MRR_Software/NameChanger.html">NameChanger</a>, and it is a utility that works well&#8230;  Especially since it&#8217;s free..  The major drawback that I saw with NameChanger is that it didn&#8217;t seem to refresh it&#8217;s list of files once they were renamed&#8230;  And it clears the Find / Replace (Original Text / New Text) fields after running.</p>
<p>But once that hurdle was cleared, I needed to add file extensions&#8230;  So, what does any programmer do in a case like this?  Write an python application:</p>
<pre>import os
import sys</pre>
<pre>filenames = os.listdir (".")
for filename in filenames:
    if filename.endswith ("html.txt"):
        new_filename = filename.replace (".txt", "")
        os.rename (filename, new_filename)</pre>
<pre>    (shortname, extension) = os.path.splitext (filename)
    if extension == "":
        new_filename = filename +".txt"
        os.rename (filename, new_filename)</pre>
<p>Yes, this is a very single purpose application, but if someone finds it useful feel free to use this as a starting point.</p>
<p>The application will gather a list of files that are in the current directory, anything that has an &#8220;.html.txt&#8221; extension will be renamed to .txt.  If there is no file extension then an .txt extension will be added&#8230;</p>
<p>Why did I make this?  I have a directory that I use to gather usenet messages in, and quicklook wouldn&#8217;t work until I renamed them to .txt (or .jpg, etc).  Since this directory was 99% text files, I needed a fast and dirty way to rename them, thus the script above.</p>
<p>Feel free to make any suggestions or to propose better methods just leave them in the comments&#8230;</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2010/10/renaming-2-thousand-files-do-it-the-python-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Indigo Restful API &#8211; Update</title>
		<link>http://www.schollnick.net/wordpress/2010/08/python-indigo-restful-api-update/</link>
		<comments>http://www.schollnick.net/wordpress/2010/08/python-indigo-restful-api-update/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 23:33:19 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Indigo & Home Automation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Indigo]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=3849</guid>
		<description><![CDATA[I have updated the SVN server, and now have a example command line application in there (device_report.py), it duplicates the device report plugin, reporting to screen or CSV file the devices that are in your Indigo Database.
Screen Example:
Device Name: Kitchen Task Lighting IconDescription: None (N/A)Address: 07.A0.B7Device Type: ICON ApplianceFirmware: 2.8Status: offLast Updated: 2010-08-15Device Name: Kitchen [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I have updated the SVN server, and now have a example command line application in there (device_report.py), it duplicates the device report plugin, reporting to screen or CSV file the devices that are in your Indigo Database.</p>
<p><span style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: 16px; font-size: 12px;">Screen Example:</span></p>
<p><span style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: 16px; font-size: 12px;"><br style="padding: 0px; margin: 0px;" />Device Name: Kitchen Task Lighting Icon<br style="padding: 0px; margin: 0px;" />Description: None (N/A)<br style="padding: 0px; margin: 0px;" />Address: 07.A0.B7<br style="padding: 0px; margin: 0px;" />Device Type: ICON Appliance<br style="padding: 0px; margin: 0px;" />Firmware: 2.8<br style="padding: 0px; margin: 0px;" />Status: off<br style="padding: 0px; margin: 0px;" />Last Updated: 2010-08-15<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />Device Name: Kitchen KeyPad<br style="padding: 0px; margin: 0px;" />Description: None (N/A)<br style="padding: 0px; margin: 0px;" />Address: 0B.49.F1<br style="padding: 0px; margin: 0px;" />Device Type: KeypadLinc Relay<br style="padding: 0px; margin: 0px;" />Firmware: 3.3<br style="padding: 0px; margin: 0px;" />Status: on<br style="padding: 0px; margin: 0px;" />Last Updated: 2010-08-15<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />Device Name: Bed Room Light<br style="padding: 0px; margin: 0px;" />Description: None (N/A)<br style="padding: 0px; margin: 0px;" />Address: 14.28.BF<br style="padding: 0px; margin: 0px;" />Device Type: LampLinc<br style="padding: 0px; margin: 0px;" />Firmware: 3.10<br style="padding: 0px; margin: 0px;" />Status: 0%<br style="padding: 0px; margin: 0px;" />Last Updated: 2010-08-15<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />CSV sample:<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />Device Name,Description,Addr,Device Type,Firmware,Status,Last updated<br style="padding: 0px; margin: 0px;" />Kitchen Task Lighting Icon,None (N/A),07.A0.B7,ICON Appliance,2.8,off,2010-08-15<br style="padding: 0px; margin: 0px;" />Kitchen KeyPad,None (N/A),0B.49.F1,KeypadLinc Relay,3.3,on,2010-08-15<br style="padding: 0px; margin: 0px;" />Bed Room Light,None (N/A),14.28.BF,LampLinc,3.10,0%,2010-08-15<br style="padding: 0px; margin: 0px;" />Master Bedroom Keylinc,None (N/A),0E.2B.08,KeypadLinc V2 Dimmer,2.13,0%,2010-08-15</span></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2010/08/python-indigo-restful-api-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculating Distance Between Latitude Longitude Pairs in Python</title>
		<link>http://www.schollnick.net/wordpress/2010/03/calculating-distance-between-latitude-longitude-pairs-in-python/</link>
		<comments>http://www.schollnick.net/wordpress/2010/03/calculating-distance-between-latitude-longitude-pairs-in-python/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 13:02:53 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=2741</guid>
		<description><![CDATA[Here&#8217;s a situation, you have two latitude &#38; longitude pairs, and need to find the distance between the two&#8230;
Here&#8217;s a blog entry with the python code&#8230;
Calculating Distance Between Latitude Longitude Pairs in Python
No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a situation, you have two latitude &amp; longitude pairs, and need to find the distance between the two&#8230;</p>
<p>Here&#8217;s a blog entry with the python code&#8230;</p>
<p><a href="http://www.geesblog.com/2009/01/calculating-distance-between-latitude-longitude-pairs-in-python/">Calculating Distance Between Latitude Longitude Pairs in Python</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2010/03/calculating-distance-between-latitude-longitude-pairs-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indigo Remote Log Viewer v1.54 released</title>
		<link>http://www.schollnick.net/wordpress/2010/02/indigo-remote-log-viewer-v1-54-released/</link>
		<comments>http://www.schollnick.net/wordpress/2010/02/indigo-remote-log-viewer-v1-54-released/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 03:12:04 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[House and Home]]></category>
		<category><![CDATA[Indigo & Home Automation]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Remote Event Log]]></category>
		<category><![CDATA[Indigo]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=2450</guid>
		<description><![CDATA[Folks,
Here&#8217;s the newest version of the Remote Log Viewer for Indigo.  It fixes a issue that was exposed when running under a Snow Leopard OS.  The current days log file would appear to have duplicate entries&#8230;
This was only a cosmetic issue, and has been fixed.
The download for the release is available here&#8230;
No related [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Folks,</p>
<p>Here&#8217;s the newest version of the Remote Log Viewer for Indigo.  It fixes a issue that was exposed when running under a Snow Leopard OS.  The current days log file would appear to have duplicate entries&#8230;</p>
<p>This was only a cosmetic issue, and has been fixed.</p>
<p>The download for the release is available here&#8230;<a href="http://www.schollnick.net/wordpress/downloads49">Indigo Remote Log Viewer (1.54) Version - 1.54, Downloaded - 244 times</A></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2010/02/indigo-remote-log-viewer-v1-54-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good Math, Bad Math &#8211; I Get Mail &#8211; Iterative Compression</title>
		<link>http://www.schollnick.net/wordpress/2009/03/good-math-bad-math-i-get-mail-iterative-compression/</link>
		<comments>http://www.schollnick.net/wordpress/2009/03/good-math-bad-math-i-get-mail-iterative-compression/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 14:27:28 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[SAN Loss]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=354</guid>
		<description><![CDATA[Mark C. Chu-Carroll writes about data compression and shrinking gains with multiple pass encryption&#8230;.  He&#8217;s a little on the technical side, but anyone with a basic understanding should be able to easily keep up&#8230;
Good Math, Bad Math : I Get Mail: Iterative Compression: &#8220;He&#8217;s invented a method where he can take a source document, [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Mark C. Chu-Carroll writes about data compression and shrinking gains with multiple pass encryption&#8230;.  He&#8217;s a little on the technical side, but anyone with a basic understanding should be able to easily keep up&#8230;</p>
<p><a href="http://scienceblogs.com/goodmath/2009/03/i_get_mail_iterative_compressi.php">Good Math, Bad Math : I Get Mail: Iterative Compression</a>: &#8220;He&#8217;s invented a method where he can take a source document, and repeatedly compress it, making it smaller each time.</p>
<p>This is a stupid idea that I&#8217;ve seen entirely too many times. But instead of just making fun of it, I thought it would be interesting to explain in detail why it doesn&#8217;t work. It touches on a bunch of basic facts about how data compression works, and provides a nice excuse for me to write a bit about compression.&#8221;</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2009/03/good-math-bad-math-i-get-mail-iterative-compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indigo Remote Device Listings v1.05</title>
		<link>http://www.schollnick.net/wordpress/2009/03/indigo-remote-device-listings-v105/</link>
		<comments>http://www.schollnick.net/wordpress/2009/03/indigo-remote-device-listings-v105/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 18:48:33 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Indigo & Home Automation]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Indigo]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=340</guid>
		<description><![CDATA[Here&#8217;s a relatively quick application to list all your devices via the Web Plugin system of Indigo&#8230;
The application will display:

Device Name
Description
X10 or Insteon Address
The Device Type
The Device&#8217;s Firmware level
Status
Last Modified Date

For example:

How about some feedback, and suggestions on what else you might want to see?
Indigo Remote Device Listing v1.05
Recent Changes so far:

Added better error checking, [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a relatively quick application to list all your devices via the Web Plugin system of Indigo&#8230;</p>
<p>The application will display:</p>
<ul>
<li>Device Name</li>
<li>Description</li>
<li>X10 or Insteon Address</li>
<li>The Device Type</li>
<li>The Device&#8217;s Firmware level</li>
<li>Status</li>
<li>Last Modified Date</li>
</ul>
<p>For example:</p>
<div style="text-align:center;"><img src="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/02/picture-3.png" border="0" alt="Picture 3.png" width="90%" /></div>
<p>How about some feedback, and suggestions on what else you might want to see?</p>
<p><a href="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/03/devicelist_105.zip">Indigo Remote Device Listing v1.05</a></p>
<p>Recent Changes so far:</p>
<ul>
<li>Added better error checking, and resolved some issues with Single Digit Firmware values</li>
</ul>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2009/03/indigo-remote-device-listings-v105/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/02/picture-3-150x146.png" length="3886" type="image/jpg" />	</item>
		<item>
		<title>Black Bird &#124; Programmazione » Progetti » WordPress Library</title>
		<link>http://www.schollnick.net/wordpress/2009/02/black-bird-programmazione-%c2%bb-progetti-%c2%bb-wordpress-library/</link>
		<comments>http://www.schollnick.net/wordpress/2009/02/black-bird-programmazione-%c2%bb-progetti-%c2%bb-wordpress-library/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 11:25:43 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=246</guid>
		<description><![CDATA[A python based wordpress API for adding:

Publishing new post
Editing old post
Publishing draft post
Deleting post
Changing post categories
Getting blog and user informations
Upload multimedia files like movies or photos
Getting last recents post
Getting last post
Getting Trackbacks of post
Getting Pingbacks of post

Black Bird &#124; Programmazione » Progetti » WordPress Library.
No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>A python based wordpress API for adding:</p>
<ul>
<li>Publishing new post</li>
<li>Editing old post</li>
<li>Publishing draft post</li>
<li>Deleting post</li>
<li>Changing post categories</li>
<li>Getting blog and user informations</li>
<li>Upload multimedia files like movies or photos</li>
<li>Getting last recents post</li>
<li>Getting last post</li>
<li>Getting Trackbacks of post</li>
<li>Getting Pingbacks of post</li>
</ul>
<p><a href="http://www.blackbirdblog.it/programmazione/progetti/28">Black Bird | Programmazione » Progetti » WordPress Library</a>.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2009/02/black-bird-programmazione-%c2%bb-progetti-%c2%bb-wordpress-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indigo Remote Device Listings</title>
		<link>http://www.schollnick.net/wordpress/2009/02/indigo-remote-device-listings/</link>
		<comments>http://www.schollnick.net/wordpress/2009/02/indigo-remote-device-listings/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 20:01:49 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Indigo & Home Automation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Indigo]]></category>

		<guid isPermaLink="false">http://www.schollnick.net/wordpress/?p=177</guid>
		<description><![CDATA[Here&#8217;s a relatively quick application to list all your devices via the Web Plugin system of Indigo&#8230;
The application will display:
* Device Name
* Description
* Insteon Address
* The Device Type
* The Device&#8217;s Firmware level
For example:

How about some feedback, and suggestions on what else you might want to see?
DeviceList_100.zip
Suggestions so far:

Add Last Modified Time Stamp to the listing


No [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a relatively quick application to list all your devices via the Web Plugin system of Indigo&#8230;</p>
<p>The application will display:</p>
<p>* Device Name<br />
* Description<br />
* Insteon Address<br />
* The Device Type<br />
* The Device&#8217;s Firmware level</p>
<p>For example:</p>
<div style="text-align:center;"><img src="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/02/picture-3.png" border="0" alt="Picture 3.png" width="90%" /></div>
<p>How about some feedback, and suggestions on what else you might want to see?</p>
<p><a title="DeviceList_100.zip" href="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/02/devicelist-100.zip">DeviceList_100.zip</a></p>
<p>Suggestions so far:</p>
<ul>
<li>Add Last Modified Time Stamp to the listing</li>
<li></li>
</ul>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.schollnick.net/wordpress/2009/02/indigo-remote-device-listings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://cloudfront.schollnick.net.s3.amazonaws.com/wordpress/wp-content/uploads/2009/02/picture-3-150x146.png" length="3886" type="image/jpg" />	</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: basic
Content Delivery Network via Amazon Web Services: S3: cloudfront.schollnick.net.s3.amazonaws.com

Served from: www.schollnick.net @ 2012-02-09 17:45:00 -->
