title: auto run python result in "EOF when reading a line "
body: <p>I have add the line into my <em>.vimrc</em></p>
  
  <pre><code>map &lt;F4&gt; :w !python&lt;cr&gt;
  </code></pre>
  
  <p>When I open gvim to edit an unname Python file, there are only two lines in it</p>
  
  <pre><code>x=input("which one do you like ? ")
  print(x)
  </code></pre>
  
  <p>I press <kbd>F4</kbd>, and get <code>EOF when  reading a line</code>, how to solve it?</p>
  
  <p>When you add <code>map &lt;F4&gt; :w&lt;cr&gt;:!python %&lt;cr&gt;</code> or <code>imap &lt;F4&gt; &lt;Esc&gt;:w &lt;cr&gt;:!python %&lt;cr&gt;</code>, it can only make a named file run, if it is a no named file, the map will not work, how can I make the no named file run?</p>
  
  <p><img src="https://i.stack.imgur.com/9g5OW.jpg" alt="enter image description here"></p>