def askopenfile(mode='r', **options):
 filename = Open(**options).show()
 if filename:
  return open(filename, mode)
 return None

def askopenfile ( mode = 'r' , ** options ) : filename = Open ( ** options ) . show ( ) if filename : return open ( filename , mode ) return None
ask for a filename to open .