[Zope-Checkins] CVS: Zope3/lib/python/Interface - pyskel.py:1.1.2.13
Stephan Richter
srichter@cbu.edu
Wed, 5 Jun 2002 11:00:48 -0400
Update of /cvs-repository/Zope3/lib/python/Interface
In directory cvs.zope.org:/tmp/cvs-serv14752
Modified Files:
Tag: Zope-3x-branch
pyskel.py
Log Message:
Another little adjustment, so that you do not need the path to start with
'./' or '../' anymore. You now just say:
pyskel.py IDomain.py
=== Zope3/lib/python/Interface/pyskel.py 1.1.2.12 => 1.1.2.13 ===
# Support for file path syntax; this way I can use TAB to search for
# the module.
- if '/' in name:
+ if '/' in name or name.endswith('.py'):
# We got a relative path. Let's try to get the full one and then
# make a package path out of it.
- if name.startswith('./') or name.startswith('../'):
+ if not name.startswith('/'):
cwd = os.getcwd()
for path in sys.path[1:]: # Yeah, we need to exclude the cwd itself
if path != '' and cwd.startswith(path):