author | greg |
Thu, 22 Oct 2009 11:27:30 +0200 | |
changeset 424 | 86a7c1d11bbd |
parent 366 | cd90e4c10261 |
permissions | -rw-r--r-- |
366
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
1 |
from os import listdir, path |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
2 |
|
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
3 |
_base_path = path.split(__file__)[0] |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
4 |
|
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
5 |
__all__ = [name for name in listdir(_base_path) if path.isdir(path.join(_base_path, name)) and name.upper() != "CVS" or name.endswith(".py") and not name.startswith("__")] |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
6 |
|
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
7 |
helps = [] |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
8 |
for name in __all__: |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
9 |
helpfilename = path.join(_base_path, name, "README") |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
10 |
if path.isfile(helpfilename): |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
11 |
helps.append(open(helpfilename).readline().strip()) |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
12 |
else: |
cd90e4c10261
Move python evaluator to create a python plugin containing any related python module
laurent
parents:
diff
changeset
|
13 |
helps.append(name) |