def _get_bin_dir(self):
        """
        Normaly we have a ...env/bin/ dir.
        But under Windows we have ...env/Scripts/
        But not PyPy2 under Windows, see:
        https://bitbucket.org/pypy/pypy/issues/2125/tcl-doesnt-work-inside-a-virtualenv-on#comment-21247266

        So just try to test via os.path.isdir()
        """
        for subdir in ("bin", "Scripts"):
            bin_dir = os.path.join(self.abs_home_dir, subdir)
            if os.path.isdir(bin_dir):
                print("bin dir: %r" % bin_dir)
                return bin_dir
        raise RuntimeError("Can't find 'bin/Scripts' dir in: %r" % self.abs_home_dir)
def _get_bin_dir ( self ) : for subdir in ( "bin" , "Scripts" ) : bin_dir = os . path . join ( self . abs_home_dir , subdir ) if os . path . isdir ( bin_dir ) : print ( "bin dir: %r" % bin_dir ) return bin_dir raise RuntimeError ( "Can't find 'bin/Scripts' dir in: %r" % self . abs_home_dir )
Normaly we have a ...env/bin/ dir.
        But under Windows we have ...env/Scripts/
        But not PyPy2 under Windows, see:
        https://bitbucket.org/pypy/pypy/issues/2125/tcl-doesnt-work-inside-a-virtualenv-on#comment-21247266

        So just try to test via os.path.isdir()