(self, ensuremode, path)
| 1058 | return pkgpath |
| 1059 | |
| 1060 | def _ensuresyspath(self, ensuremode, path): |
| 1061 | if ensuremode: |
| 1062 | s = str(path) |
| 1063 | if ensuremode == "append": |
| 1064 | if s not in sys.path: |
| 1065 | sys.path.append(s) |
| 1066 | else: |
| 1067 | if s != sys.path[0]: |
| 1068 | sys.path.insert(0, s) |
| 1069 | |
| 1070 | def pyimport(self, modname=None, ensuresyspath=True): |
| 1071 | """Return path as an imported python module. |