62a63 > import zipfile 93a95,98 > if os.name == 'java' and os._name == 'nt' and dir.startswith("/") and dir[2] == ':': > # strip out the leading '/' character if we have something like: > # /c:/jython2.5 and turn it into c:/jython2.5 > dir = dir[1:] 176a182,192 > def addjythonsitepackages(known_paths): > lib_jars = [] > for lib_dir in [p for p in sys.path if '.jar' in p.lower()]: > while not lib_dir.endswith('.jar'): > lib_dir = os.path.split(lib_dir)[0] > if 'Lib/site-packages/' in zipfile.ZipFile(lib_dir).namelist(): > lib_jars.append(lib_dir) > if len(lib_jars) == 1: > sitedir= os.path.normpath(os.path.join(lib_jars[0], 'Lib/site-packages')) > addsitedir(sitedir, known_paths) > 188a205 > addjythonsitepackages(known_paths)