def save_file_dialog(default_format='png'):
 filename = QtGui.QFileDialog.getSaveFileName()
 filename = _format_filename(filename)
 if (filename is None):
  return None
 (basename, ext) = os.path.splitext(filename)
 if (not ext):
  filename = ('%s.%s' % (filename, default_format))
 return filename

def save_file_dialog ( default_format = 'png' ) : filename = QtGui . QFileDialog . getSaveFileName ( ) filename = _format_filename ( filename ) if ( filename is None ) : return None ( basename , ext ) = os . path . splitext ( filename ) if ( not ext ) : filename = ( '%s.%s' % ( filename , default_format ) ) return filename
return user-selected file path .