def startfile(fpath, verbose=True):  
from ubelt import util_cmd<EOL>if verbose:<EOL><INDENT>print('<STR_LIT>'.format(fpath))<EOL><DEDENT>fpath = normpath(fpath)<EOL>if not exists(fpath):<EOL><INDENT>raise Exception('<STR_LIT>' % fpath)<EOL><DEDENT>if not WIN32:<EOL><INDENT>import pipes<EOL>fpath = pipes.quote(fpath)<EOL><DEDENT>if LINUX:<EOL><INDENT>info = util_cmd.cmd(('<STR_LIT>', fpath), detach=True, verbose=verbose)<EOL><DEDENT>elif DARWIN:<EOL><INDENT>info = util_cmd.cmd(('<STR_LIT>', fpath), detach=True, verbose=verbose)<EOL><DEDENT>elif WIN32:<EOL><INDENT>os.startfile(fpath)<EOL>info = None<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>if info is not None:<EOL><INDENT>if not info['<STR_LIT>']:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT><DEDENT>
Uses default program defined by the system to open a file.
This is done via `os.startfile` on windows, `open` on mac, and `xdg-open`
on linux.

Args:
    fpath (PathLike): a file to open using the program associated with the
        files extension type.
    verbose (int): verbosity

References:
    http://stackoverflow.com/questions/2692873/quote-posix

DisableExample:
    >>> # This test interacts with a GUI frontend, not sure how to test.
    >>> import ubelt as ub
    >>> base = ub.ensure_app_cache_dir('ubelt')
    >>> fpath1 = join(base, 'test_open.txt')
    >>> ub.touch(fpath1)
    >>> proc = ub.startfile(fpath1)