title: how to use Python SaveAs dialog
body: <p>I'm trying to find a python function for presenting a 'save file as' dialog that returns a filename as a string. </p>
  
  <p>I quickly found the <code>tkFileDialog</code> module, only to realize that its <code>asksaveasfilename</code> function throws an exception if the file entered doesn't already exist, which is not the behavior I'm looking for.</p>
  
  <p>I think the answer I'm looking for is in the Python <code>FileDialog</code> module, but my best guess is that it's the <code>get_selection</code> method of the <code>SaveFileDialog</code> class. Below, you can see my blundering about in interactive mode trying to figure out usage:</p>
  
  <pre><code>&gt;&gt;&gt; FileDialog.SaveFileDialog.get_selection()
  Traceback (most recent call last):
    File "&lt;interactive input&gt;", line 1, in &lt;module&gt;
  TypeError: unbound method get_selection() must be called with SaveFileDialog instance as first argument (got nothing instead)
  &gt;&gt;&gt; x = FileDialog.SaveFileDialog()
  Traceback (most recent call last):
    File "&lt;interactive input&gt;", line 1, in &lt;module&gt;
  TypeError: __init__() takes at least 2 arguments (1 given)
  </code></pre>
  
  <p>First I was trying to see if I could just invoke the dialog box. Then seeing that I needed a <code>SaveFileDialog</code> instance, I tried to assign one to the variable <code>x</code>. But apparently that also takes two arguments, and that's where I get really lost. </p>
  
  <p>Help?</p>