On Fri, Nov 9, 2018 at 4:32 PM, danish bluecheese <[email protected]> wrote: > you are right on the lines you mentioned. Those are all working if i run it > as a module which i do every time. > This is somewhat unpleasant to me, especially while developing something and > trying to test it quickly. > I just want to be able to use same relative imports and run single file with > `python3 test_main.py` for example. > Running files as modules every time is tiring. This is my problem.
Have you tried 'python3 -m test_main'? IIRC it should be effectively the same as 'python3 test_main.py' but with working relative imports. -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
