Relative imports in Python 3
unfortunately, this module needs to be inside the package, and it also needs to be runnable as a script, sometimes. Any idea how I could achieve that? It’s quite common to have a layout like this… main.py mypackage/ __init__.py mymodule.py myothermodule.py …with a mymodule.py like this… #!/usr/bin/env python3 # Exported function def as_int(a): return int(a) … Read more