title: Py2Exe lost sys.stdin error?
body: <p>I have a very simple script, that creates a file as big as the user wants:</p>
  
  <pre><code>from uuid import uuid4
  
  global ammount
  ammount = None
  
  def randbyte():
      l = []
      a = uuid4().hex
      for char in a:
          l.append(str(char))
      return l[6]
  
  def randkb():
      a = ''
      for num in range(0, 32):
          a = a + uuid4().hex
      return a
  
  def randmb():
      a = ''
      for num in range(0, 32):
          a = a + randkb()
      return a
  
  exit = False
  print('##### DATA DUMP v1 #####')
  while exit == False:
      ammount = input('AMMOUNT OF DATA TO DUMP IN BYTES &gt;&gt; ')
      try:
          ammount = int(arg)
          print('DUMPING...')
          b = int(ammount % 32)
          a = int(ammount - b)
          c = int(a / 32)
          with open('dump.txt', 'w') as file:
              for num in range(0, c):
                  print('KB')
                  a = uuid4().hex
                  file.write(a)
              for num in range(0, b):
                  print('B')
                  a = randbyte()
                  file.write(a)
          print('COMPLETED')
      except ValueError:
          print('ARGUMENT MUST BE AN INTEGER')
  </code></pre>
  
  <p>It works fine when I run it through the interpreter. However, when I put it through py2exe, I always get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "d.py", line 31, in &lt;module&gt;
  RuntimeError: input(): lost sys.stdin
  </code></pre>
  
  <p>My setup.py is this:</p>
  
  <pre><code>from distutils.core import setup
  import py2exe
  setup(
      options = {"py2exe": {'bundle_files': 2, 'compressed': True}},
      windows = [{'script': "d.py"}],
      zipfile = None,
  )
  </code></pre>
  
  <p>I searched for a while but couldn't find any solutions that apply in this particular case. Did I miss something? Any ideas on how to make it work?</p>