def _in_venv(path):
bindir = path.join("<STR_LIT>" if sys.platform.startswith("<STR_LIT>") else "<STR_LIT>")<EOL>if not bindir.isdir():<EOL><INDENT>return False<EOL><DEDENT>activates = (<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>)<EOL>return any([fname.basename in activates for fname in bindir.listdir()])<EOL>
Attempts to detect if ``path`` is the root of a Virtual Environment by
    checking for the existence of the appropriate activate script