python Tkinter tkFileDialog
<p>in short, what's the difference between</p>

<pre><code>tkFileDialog.asksaveasfile
</code></pre>

<p>and</p>

<pre><code>tkFileDialog.asksaveasfilename
</code></pre>

<p>I could not understand from the build in docs</p>

<p>According to the <a href="http://tkinter.unpythonic.net/wiki/tkFileDialog" rel="nofollow">http://tkinter.unpythonic.net/</a> wiki:</p>

<p>Similar to:</p>

<blockquote>
  <p>First you have to decide if you want to open a file or just want to get a filename in order to open the file on your own. In the first case you should use <code>tkFileDialog.askopenfile()</code> in the latter case <code>tkFileDialog.askopenfilename()</code>.</p>
</blockquote>

<p>then:</p>

<blockquote>
  <p>Saving files works in a similar way. You also have two variants of the function, one to get an opened file which you can use to save your data and another to get a file name in order to open the file on your own. These functions are only provided in the single file version. A multiple file version would make no sense.</p>
</blockquote>

python tkinter