Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad Num Num Num Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Import alias Import alias Import alias Import alias ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr Str body If CompareNotEq Call AttributeLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num attr Str body AugAssignAdd NameStore Str Import alias TryExcept body Assign NameStore BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore TupleLoad NameLoad BinOpAdd Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Pass If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Return CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str For NameStore NameLoad body If Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return NameLoad orelse If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num attr body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad orelse If BoolOpAnd CompareNotEq AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Str Assign NameStore ListLoad If CompareIs NameLoad NameLoad body Assign NameStore Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr orelse Assign NameStore Num If Call AttributeLoad AttributeLoad NameLoad attr attr Str body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str attr AttributeLoad NameLoad attr For NameStore NameLoad body If CompareEq Call AttributeLoad NameLoad attr Str body Break orelse Assign NameStore ListLoad Str Str Str orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str orelse If CompareIsNot NameLoad NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore ListLoad If BoolOpOr CompareIn AttributeLoad NameLoad attr NameLoad BoolOpAnd AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad TupleLoad NameLoad Str NameLoad NameLoad If NameLoad body Expr Yield NameLoad orelse Expr Yield SubscriptLoad NameLoad Index Num orelse For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr Str CompareGtE Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Num For NameStore BinOpAdd ListLoad Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If NameLoad body Assign NameStore BinOpMod Str NameLoad orelse If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore BinOpMod Str NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Str orelse Assign NameStore BinOpMod Str BinOpSub NameLoad Num Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body If NameLoad body Expr Yield NameLoad orelse Expr Yield SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If NameLoad body If NameLoad body Expr Yield NameLoad orelse Expr Yield SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Str TryExcept body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Str Return Call NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Str ListLoad Str Str Str Str Str Str Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num For TupleStore NameStore NameStore NameLoad body If CompareIn NameLoad TupleLoad Str Str body Print NameLoad Return Num orelse If CompareIn NameLoad TupleLoad Str Str body Print BinOpMod Str NameLoad Return Num orelse If CompareIn NameLoad TupleLoad Str Str body Assign NameStore Num orelse If CompareIn NameLoad TupleLoad Str Str body Assign NameStore Num orelse If CompareIn NameLoad TupleLoad Str Str body Assign NameStore Num orelse If CompareIn NameLoad TupleLoad Str Str body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore ListLoad orelse If CompareIn NameLoad TupleLoad Str Str body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore ListLoad If CompareEq Call NameLoad NameLoad Num body Return Num Assign NameStore Num For NameStore NameLoad body Assign NameStore Num For NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad body If NameLoad body Print BinOpMod Str NameLoad orelse Print NameLoad AugAssignAdd NameStore Num If UnaryOpNot NameLoad body Break If UnaryOpNot NameLoad body AugAssignAdd NameStore Num Return NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr
N/A N/A Find the full path to commands.

which(command, path=None, verbose=0, exts=None)
    Return the full path to the first match of the given command on the
    path.

whichall(command, path=None, verbose=0, exts=None)
    Return a list of full paths to all matches of the given command on
    the path.

whichgen(command, path=None, verbose=0, exts=None)
    Return a generator which will yield full paths to all matches of the
    given command on the path.
    
By default the PATH environment variable is searched (as well as, on
Windows, the AppPaths key in the registry), but a specific 'path' list
to search may be specified as well.  On Windows, the PATHEXT environment
variable is applied as appropriate.

If "verbose" is true then a tuple of the form
    (<fullpath>, <matched-where-description>)
is returned for each match. The latter element is a textual description
of where the match was found. For example:
    from PATH element 0
    from HKLM\SOFTWARE\...\perl.exe
 N/A _cmdlnUsage 
    Show the full path of commands.

    Usage:
        which [<options>...] [<command-name>...]

    Options:
        -h, --help      Print this help and exit.
        -V, --version   Print the version info and exit.

        -a, --all       Print *all* matching paths.
        -v, --verbose   Print out how matches were located and
                        show near misses on stderr.
        -q, --quiet     Just print out matches. I.e., do not print out
                        near misses.

        -p <altpath>, --path=<altpath>
                        An alternative path (list of directories) may
                        be specified for searching.
        -e <exts>, --exts=<exts>
                        Specify a list of extensions to consider instead
                        of the usual list (';'-separate list, Windows
                        only).

    Show the full path to the program that would be run for each given
    command name, if any. Which, like GNU's which, returns the number of
    failed arguments, or -1 when no <command-name> was given.

    Near misses include duplicates, non-regular files and (on Un*x)
    files without executable access.
 N/A __revision__ $Id$ N/A __version_info__ N/A 1 1 3 N/A __version__ N/A N/A . join N/A map str __version_info__ N/A __all__ N/A which whichall whichgen WhichError N/A os N/A sys N/A getopt N/A stat WhichError N/A Exception N/A N/A N/A _getRegisteredExecutable N/A N/A exeName N/A N/A N/A Windows allow application paths to be registered in the registry. N/A registered None N/A N/A N/A N/A sys platform startswith win N/A N/A N/A N/A N/A N/A N/A N/A N/A os path splitext exeName N/A 1 lower .exe N/A N/A exeName .exe N/A _winreg N/A N/A N/A key N/A SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ exeName N/A value N/A N/A _winreg QueryValue N/A _winreg HKEY_LOCAL_MACHINE key N/A registered N/A value N/A from HKLM\ key N/A N/A N/A N/A _winreg error N/A N/A N/A N/A registered N/A N/A N/A N/A os path exists N/A registered N/A 0 N/A N/A registered None N/A registered N/A _samefile N/A N/A fname1 fname2 N/A N/A N/A N/A N/A N/A sys platform startswith win N/A N/A N/A N/A N/A N/A os path normpath N/A N/A N/A os path normcase fname1 N/A N/A N/A os path normpath N/A N/A N/A os path normcase fname2 N/A N/A N/A N/A N/A os path samefile fname1 fname2 N/A _cull N/A N/A potential matches verbose N/A 0 N/A N/A Cull inappropriate matches. Possible reasons:
        - a duplicate of a previous match
        - not a disk file
        - not executable (non-Windows)
    If 'potential' is approved it is returned and added to 'matches'.
    Otherwise, None is returned.
     N/A match matches N/A N/A N/A _samefile N/A potential N/A 0 N/A match N/A 0 N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write N/A duplicate: %s (%s)
 potential N/A None N/A N/A N/A N/A N/A stat S_ISREG N/A N/A N/A os stat N/A potential N/A 0 st_mode N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write N/A not a regular file: %s (%s)
 potential N/A N/A N/A N/A N/A sys platform win32 N/A N/A N/A os access N/A potential N/A 0 N/A os X_OK N/A N/A verbose N/A N/A N/A N/A N/A sys stderr write N/A no executable access: %s (%s)
 potential N/A N/A N/A N/A matches append potential N/A potential N/A whichgen N/A N/A command path verbose exts N/A None 0 None N/A N/A Return a generator of full paths to the given command.
    
    "command" is a the name of the executable to search for.
    "path" is an optional alternate path list to search. The default it
        to use the PATH environment variable.
    "verbose", if true, will cause a 2-tuple to be returned for each
        match. The second element is a textual description of where the
        match was found.
    "exts" optionally allows one to specify a list of extensions to use
        instead of the standard list for this system. This can
        effectively be used as an optimization to, for example, avoid
        stat's of "foo.vbs" when searching for "foo" and you know it is
        not a VisualBasic script but ".vbs" is on PATHEXT. This option
        is only supported on Windows.

    This method returns a generator which yields either full paths to
    the given command or, if verbose, tuples of the form (<path to
    command>, <where path found>).
     N/A matches N/A N/A N/A path None N/A N/A usingGivenPath 0 N/A path N/A N/A N/A N/A N/A os environ get PATH split N/A os pathsep N/A N/A N/A N/A sys platform startswith win N/A N/A N/A N/A path insert 0 N/A os curdir N/A N/A usingGivenPath 1 N/A N/A N/A N/A sys platform startswith win N/A N/A N/A exts None N/A N/A exts N/A N/A N/A N/A N/A os environ get PATHEXT split N/A os pathsep N/A ext exts N/A N/A N/A N/A N/A ext lower .exe N/A N/A N/A N/A exts N/A .COM .EXE .BAT N/A N/A N/A N/A isinstance exts list N/A N/A N/A TypeError 'exts' argument must be a list or None N/A N/A N/A exts None N/A N/A N/A WhichError N/A 'exts' argument is not supported on platform '%s' N/A sys platform N/A exts N/A N/A N/A N/A N/A os sep command N/A N/A os altsep N/A N/A os altsep command N/A N/A N/A N/A N/A os path exists command N/A N/A match N/A _cull N/A command explicit path given matches verbose N/A verbose N/A N/A N/A match N/A N/A N/A N/A match N/A 0 N/A N/A i N/A range N/A len path N/A N/A dirName N/A path N/A i N/A N/A N/A N/A N/A sys platform startswith win N/A N/A len dirName 2 N/A N/A dirName N/A 0 " N/A N/A dirName N/A -1 " N/A N/A dirName N/A dirName N/A 1 -1 N/A ext N/A N/A exts N/A N/A absName N/A N/A N/A os path abspath N/A N/A N/A os path normpath N/A N/A N/A os path join dirName N/A command ext N/A N/A N/A N/A os path isfile absName N/A N/A usingGivenPath N/A N/A fromWhere N/A from given path element %d i N/A N/A N/A N/A N/A N/A sys platform startswith win N/A N/A fromWhere N/A from PATH element %d i N/A N/A N/A i 0 N/A N/A fromWhere from current directory N/A N/A fromWhere N/A from PATH element %d N/A i 1 N/A match N/A _cull N/A absName fromWhere matches verbose N/A match N/A N/A verbose N/A N/A N/A match N/A N/A N/A N/A match N/A 0 N/A match N/A _getRegisteredExecutable command N/A N/A match None N/A N/A match N/A _cull match matches verbose N/A match N/A N/A verbose N/A N/A N/A match N/A N/A N/A N/A match N/A 0 N/A which N/A N/A command path verbose exts N/A None 0 None N/A N/A Return the full path to the first match of the given command on
    the path.
    
    "command" is a the name of the executable to search for.
    "path" is an optional alternate path list to search. The default it
        to use the PATH environment variable.
    "verbose", if true, will cause a 2-tuple to be returned. The second
        element is a textual description of where the match was found.
    "exts" optionally allows one to specify a list of extensions to use
        instead of the standard list for this system. This can
        effectively be used as an optimization to, for example, avoid
        stat's of "foo.vbs" when searching for "foo" and you know it is
        not a VisualBasic script but ".vbs" is on PATHEXT. This option
        is only supported on Windows.

    If no match is found for the command, a WhichError is raised.
     N/A N/A N/A match N/A N/A N/A whichgen command path verbose exts next N/A N/A N/A StopIteration N/A N/A N/A WhichError N/A Could not find '%s' on the path. command N/A match N/A whichall N/A N/A command path verbose exts N/A None 0 None N/A N/A Return a list of full paths to all matches of the given command
    on the path.  

    "command" is a the name of the executable to search for.
    "path" is an optional alternate path list to search. The default it
        to use the PATH environment variable.
    "verbose", if true, will cause a 2-tuple to be returned for each
        match. The second element is a textual description of where the
        match was found.
    "exts" optionally allows one to specify a list of extensions to use
        instead of the standard list for this system. This can
        effectively be used as an optimization to, for example, avoid
        stat's of "foo.vbs" when searching for "foo" and you know it is
        not a VisualBasic script but ".vbs" is on PATHEXT. This option
        is only supported on Windows.
     N/A N/A list N/A whichgen command path verbose exts N/A main N/A N/A argv N/A N/A N/A all 0 N/A verbose 0 N/A altpath None N/A exts None N/A N/A N/A N/A optlist args N/A N/A getopt getopt N/A argv N/A 1 haVvqp:e: N/A help all version verbose quiet path= exts= N/A N/A N/A N/A getopt GetoptError N/A msg N/A N/A N/A N/A N/A sys stderr write N/A which: error: %s. Your invocation was: %s
 N/A msg argv N/A N/A N/A N/A sys stderr write Try 'which --help'.
 N/A 1 N/A N/A opt optarg optlist N/A N/A N/A opt N/A -h --help N/A N/A _cmdlnUsage N/A 0 N/A N/A N/A opt N/A -V --version N/A N/A N/A which %s __version__ N/A 0 N/A N/A N/A opt N/A -a --all N/A N/A all 1 N/A N/A N/A opt N/A -v --verbose N/A N/A verbose 1 N/A N/A N/A opt N/A -q --quiet N/A N/A verbose 0 N/A N/A N/A opt N/A -p --path N/A N/A optarg N/A N/A altpath N/A N/A optarg split N/A os pathsep N/A N/A altpath N/A N/A N/A N/A opt N/A -e --exts N/A N/A optarg N/A N/A exts N/A N/A optarg split N/A os pathsep N/A N/A exts N/A N/A N/A N/A len args 0 N/A N/A -1 N/A failures 0 N/A arg args N/A N/A nmatches 0 N/A match N/A whichgen arg path altpath verbose verbose exts exts N/A N/A verbose N/A N/A N/A %s (%s) match N/A N/A match N/A nmatches 1 N/A N/A all N/A N/A N/A N/A nmatches N/A N/A failures 1 N/A failures N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main N/A sys argv