title: Reading from StringIO without resetting position
body: <p>I have a test code with the following:</p>
  
  <pre><code>with open('master.log') as f:
      print(f.read(8))
      print(f.read(8))
  </code></pre>
  
  <p>This prints as:</p>
  
  <pre><code>&gt;&gt; pi@raspberrypi:~/workspace/Program $ sudo python test.py
  &gt;&gt; 12/29/20
  &gt;&gt; 17 12:52
  </code></pre>
  
  <p>This has different prints as you can see. However, when I do this:</p>
  
  <pre><code>import cStringIO
  
  stream= "1234567890"
  print(cStringIO.StringIO(stream).read(8))
  print(cStringIO.StringIO(stream).read(8))
  </code></pre>
  
  <p>When I run this, I get this following output:</p>
  
  <pre><code>&gt;&gt; pi@raspberrypi:~/workspace/Program $ sudo python test.py
  &gt;&gt; 12345678
  &gt;&gt; 12345678
  </code></pre>
  
  <p>In this case, it outputs the same values (the seeker doesn't advance).</p>
  
  <p>I need to make it so cStringIO (or a similar solution) reads strings the same way as files. Without resetting the position every read I mean.</p>