<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Bizarre Python File Error</title>
	<atom:link href="http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/</link>
	<description>Random notes about software development</description>
	<lastBuildDate>Tue, 31 Jan 2012 20:59:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: John</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-126</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Thu, 25 Nov 2010 00:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-126</guid>
		<description><![CDATA[Thanks for writing about this bug!  You saved me a lot of time. :)

many thanks.]]></description>
		<content:encoded><![CDATA[<p>Thanks for writing about this bug!  You saved me a lot of time. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron McLaren</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-107</link>
		<dc:creator><![CDATA[Ron McLaren]]></dc:creator>
		<pubDate>Mon, 01 Nov 2010 15:09:45 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-107</guid>
		<description><![CDATA[You need to move the file pointer to the insertion point of the write. Just do f.seek(0) to move the file pointer back to the beginning...]]></description>
		<content:encoded><![CDATA[<p>You need to move the file pointer to the insertion point of the write. Just do f.seek(0) to move the file pointer back to the beginning&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahmet alp balkan</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-62</link>
		<dc:creator><![CDATA[ahmet alp balkan]]></dc:creator>
		<pubDate>Fri, 02 Jul 2010 23:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-62</guid>
		<description><![CDATA[Most probably the problem causes from r+ mode. If you separate read stream and write stream, problem is solved.]]></description>
		<content:encoded><![CDATA[<p>Most probably the problem causes from r+ mode. If you separate read stream and write stream, problem is solved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahmet alp balkan</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-61</link>
		<dc:creator><![CDATA[ahmet alp balkan]]></dc:creator>
		<pubDate>Fri, 02 Jul 2010 23:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-61</guid>
		<description><![CDATA[I&#039;ve experienced the same bug today on python 2.6.5.12 32-bit.

I think there is something underneath causes this problem. Error message is not descriptive. Maybe the problem is I&#039;ve created file at just under c:\ folder. there may be UAC restrictions... I&#039;ll post here again when I find a soln. Please contact me if you find any, too.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve experienced the same bug today on python 2.6.5.12 32-bit.</p>
<p>I think there is something underneath causes this problem. Error message is not descriptive. Maybe the problem is I&#8217;ve created file at just under c:\ folder. there may be UAC restrictions&#8230; I&#8217;ll post here again when I find a soln. Please contact me if you find any, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Howell</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-57</link>
		<dc:creator><![CDATA[Colin Howell]]></dc:creator>
		<pubDate>Mon, 19 Apr 2010 04:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-57</guid>
		<description><![CDATA[Just ran into this myself. It seems to be a general problem with Python 2.x on Windows when doing interleaved reads and writes on a file which has been opened in a &quot;+&quot; mode. It&#039;s caused by the behavior of the underlying C library. The general workaround is to insert a flush() or seek() operation when switching between reading and writing.

Python 3.x doesn&#039;t have this problem, because the underlying I/O implementation was changed.

See the following bug reports:

http://bugs.python.org/issue3207
http://bugs.python.org/issue1636874]]></description>
		<content:encoded><![CDATA[<p>Just ran into this myself. It seems to be a general problem with Python 2.x on Windows when doing interleaved reads and writes on a file which has been opened in a &#8220;+&#8221; mode. It&#8217;s caused by the behavior of the underlying C library. The general workaround is to insert a flush() or seek() operation when switching between reading and writing.</p>
<p>Python 3.x doesn&#8217;t have this problem, because the underlying I/O implementation was changed.</p>
<p>See the following bug reports:</p>
<p><a href="http://bugs.python.org/issue3207" rel="nofollow">http://bugs.python.org/issue3207</a><br />
<a href="http://bugs.python.org/issue1636874" rel="nofollow">http://bugs.python.org/issue1636874</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uszy wieloryba</title>
		<link>http://blog.myjotnotes.com/2008/07/08/bizarre-python-file-error/#comment-50</link>
		<dc:creator><![CDATA[uszy wieloryba]]></dc:creator>
		<pubDate>Mon, 09 Nov 2009 20:15:59 +0000</pubDate>
		<guid isPermaLink="false">http://jotnotes.wordpress.com/?p=32#comment-50</guid>
		<description><![CDATA[I have experienced the same problem. 

Thanks for the workaround.]]></description>
		<content:encoded><![CDATA[<p>I have experienced the same problem. </p>
<p>Thanks for the workaround.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

