[py-svn] r11037 - py/dist/py/bin

hpk at codespeak.net hpk at codespeak.net
Fri Apr 22 21:42:46 CEST 2005


Author: hpk
Date: Fri Apr 22 21:42:45 2005
New Revision: 11037

Removed:
   py/dist/py/bin/check_python_path
Log:
move old checker script out ...


Deleted: /py/dist/py/bin/check_python_path
==============================================================================
--- /py/dist/py/bin/check_python_path	Fri Apr 22 21:42:45 2005
+++ (empty file)
@@ -1,30 +0,0 @@
-#!/usr/bin/python 
-from __future__ import generators
-
-import sys, os
-from py.path import local 
-
-def search_path(item):
-    dirs = [os.curdir]
-    PYTHONPATH = os.getenv('PYTHONPATH')
-    dirs.extend(PYTHONPATH.split(':'))
-    dirs.extend(sys.path)
-    results = {}
-    for fn in dirs: 
-        p = local(fn) 
-        # XXX zip files
-        pyfile = p.join(item).new(ext='.py') 
-        if pyfile.check(file=1) and pyfile not in results:
-            results[pyfile] = 1
-            yield pyfile 
-
-        pydir = p.join(item)
-        if pydir.check(dir=1) and pydir.join('__init__.py').check() and pydir not in results:
-            results[pydir] = 1
-            yield pydir 
-
-if __name__ == '__main__':
-    item = sys.argv[1]
-    for x in search_path(item):
-        print x
-    



More information about the pytest-commit mailing list