Import module, temporarily including modules in the current directory. Modules located in the current directory has precedence over modules located in `sys.path`.
(module, imp=None, package=None)
| 94 | |
| 95 | |
| 96 | def import_from_cwd(module, imp=None, package=None): |
| 97 | """Import module, temporarily including modules in the current directory. |
| 98 | |
| 99 | Modules located in the current directory has |
| 100 | precedence over modules located in `sys.path`. |
| 101 | """ |
| 102 | if imp is None: |
| 103 | imp = import_module |
| 104 | with cwd_in_path(): |
| 105 | return imp(module, package=package) |
| 106 | |
| 107 | |
| 108 | def reload_from_cwd(module, reloader=None): |
no test coverage detected