title: relative seek for io.StringIO in python3
body: <p>I am trying to refactor a python 2 package for use with python-3.x. The package uses <code>StringIO.StringIO</code> under python 2 and makes some use of the object's relative seek method, with statements like <code>flob.seek(-1, 1)</code>. Unfortunately, the <code>seek</code> method of the corresponding <code>io.StringIO</code> object in python 3 does not support relative seeks, so the code raises</p>
  
  <pre><code>OSError: Can't do nonzero cur-relative seeks
  </code></pre>
  
  <p>when trying to execute that statement.</p>
  
  <p>What is the best way to refactor modules containing these calls, given that I would like to be able to continue using the functions this appears in for file objects as well as (objects derived from) strings?</p>