def editfile(fpath, verbose=True):  
from six import types<EOL>from ubelt import util_cmd<EOL>import warnings<EOL>warnings.warn('<STR_LIT>', DeprecationWarning)<EOL>if not isinstance(fpath, six.string_types):<EOL><INDENT>if isinstance(fpath, types.ModuleType):<EOL><INDENT>fpath = fpath.__file__<EOL><DEDENT>else:<EOL><INDENT>fpath =  sys.modules[fpath.__module__].__file__<EOL><DEDENT>fpath_py = fpath.replace('<STR_LIT>', '<STR_LIT>')<EOL>if exists(fpath_py):<EOL><INDENT>fpath = fpath_py<EOL><DEDENT><DEDENT>if verbose:<EOL><INDENT>print('<STR_LIT>'.format(fpath))<EOL><DEDENT>editor = os.environ.get('<STR_LIT>', '<STR_LIT>')<EOL>if not exists(fpath):<EOL><INDENT>raise IOError('<STR_LIT>' % fpath)<EOL><DEDENT>util_cmd.cmd([editor, fpath], fpath, detach=True)<EOL>
DEPRICATED: This has been ported to xdev, please use that version.

Opens a file or code corresponding to a live python object in your
preferred visual editor. This function is mainly useful in an interactive
IPython session.

The visual editor is determined by the `VISUAL` environment variable.  If
this is not specified it defaults to gvim.

Args:
    fpath (PathLike): a file path or python module / function
    verbose (int): verbosity

DisableExample:
    >>> # This test interacts with a GUI frontend, not sure how to test.
    >>> import ubelt as ub
    >>> ub.editfile(ub.util_platform.__file__)
    >>> ub.editfile(ub)
    >>> ub.editfile(ub.editfile)