I guess I'm confused if you want (e.g.) `python json.py` to do something but not `python -m json` to call the same file (a different way), given you're in the directory.
nick@lappy386:~/Code$ echo "{}" | python -m json.tool
{}
nick@lappy386:~/Code$ touch json.py
nick@lappy386:~/Code$ echo "{}" | python -m json.tool
.../bin/python: Error while finding module specification for 'json.tool' (ModuleNotFoundError: __path__ attribute not found on 'json' while trying to find 'json.tool')
nick@lappy386:~/Code$ echo "{}" | python -I -m json.tool
{}
Isolated mode effectively ignores the environment (variables and directory), so it will only use what's in that Python's site-packages (non-user, but could be a virtualenv)
If you want the local path to not be on `sys.path` for a *script-like* call, you could do `python -I myscript.py`, but `-m mypkg` is I think indistinguishable from trying to `import mypkg`, so it needs to be discoverable on `sys.path`...this feels like an A/B problem: what are you trying to do?