d72755e162f3a75ce691e310d68485322bd1b73d
[plcapi.git] / PLC / Methods / __init__.py
1 #!/usr/bin/python -tt
2
3 import os
4 native_methods = []
5 toppath = os.path.dirname(__file__)
6 for path, dirs, methods in os.walk(toppath):
7     remove_dirs = []
8     for dir in dirs:
9         if dir.startswith("."):
10             remove_dirs.append(dir)
11     for dir in remove_dirs:
12         dirs.remove(dir)
13     prefix = path + "/"
14     prefix = prefix[len(toppath) + 1:].replace("/", ".")
15     for method in methods:
16         if method == "__init__.py":
17             continue
18         if not method.endswith(".py"):
19             continue
20         native_methods.append(prefix + method[:-3])