[Python-checkins] CVS: python/nondist/sandbox/help pydoc.py,1.1,1.2

Ka-Ping Yee python-dev@python.org
Sun, 14 Jan 2001 13:48:14 -0800


Update of /cvsroot/python/python/nondist/sandbox/help
In directory usw-pr-cvs1:/tmp/cvs-serv16819

Modified Files:
	pydoc.py 
Log Message:
Look for both __init__.py and __init__.pyc.


Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/help/pydoc.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** pydoc.py	2001/01/14 02:27:10	1.1
--- pydoc.py	2001/01/14 21:48:12	1.2
***************
*** 45,49 ****
          path = os.path.join(dir, entry)
          init = os.path.join(path, '__init__.py')
!         if os.path.isdir(path) and os.path.exists(init):
              results.extend(map(
                  lambda (m, s), pkg=entry: (pkg + '.' + m, s), index(path)))
--- 45,50 ----
          path = os.path.join(dir, entry)
          init = os.path.join(path, '__init__.py')
!         initc = os.path.join(path, '__init__.pyc')
!         if os.path.isfile(init) or os.path.isfile(initc):
              results.extend(map(
                  lambda (m, s), pkg=entry: (pkg + '.' + m, s), index(path)))