def save_as(filename, title=u'Save As...'):
 result = compat.getsavefilename(parent=active_window(), caption=title, basedir=filename)
 return result[0]

def save_as ( filename , title = u'Save As...' ) : result = compat . getsavefilename ( parent = active_window ( ) , caption = title , basedir = filename ) return result [ 0 ]
creates a save file dialog and returns a filename .