def get_py_filename(name, force_win32=None):
 name = os.path.expanduser(name)
 if (force_win32 is not None):
  warn("The 'force_win32' argument to 'get_py_filename' is deprecated since IPython 5.0 and should not be used anymore", DeprecationWarning, stacklevel=2)
 if ((not os.path.isfile(name)) and (not name.endswith('.py'))):
  name += '.py'
 if os.path.isfile(name):
  return name
 else:
  raise IOError(('File `%r` not found.' % name))

def get_py_filename ( name , force_win32 = None ) : name = os . path . expanduser ( name ) if ( force_win32 is not None ) : warn ( "The 'force_win32' argument to 'get_py_filename' is deprecated since IPython 5.0 and should not be used anymore" , DeprecationWarning , stacklevel = 2 ) if ( ( not os . path . isfile ( name ) ) and ( not name . endswith ( '.py' ) ) ) : name += '.py' if os . path . isfile ( name ) : return name else : raise IOError ( ( 'File `%r` not found.' % name ) )
return a valid python filename in the current directory .