parameters: (name, force_win32=None)
docstring: Return a valid python filename in the current directory.
  
      If the given name is not a file, it adds '.py' and searches again.
      Raises IOError with an informative message if the file isn't found.
docstring_summary: Return a valid python filename in the current directory.
docstring_tokens: Return a valid python filename in the current directory .
function: def get_py_filename(name, force_win32=None):
      """Return a valid python filename in the current directory.
  
      If the given name is not a file, it adds '.py' and searches again.
      Raises IOError with an informative message if the file isn't found.
      """
  
      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)
function_tokens: 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 )