serhii.net

In the middle of the desert you can say anything you want

12 May 2022

Python running modules inside modules from CLI

If you have a module inside another module, say two inside one, the syntax for running them from CLI is the same as the one used when importing them (import one.two).

Assuming your working directory contains ./one/two/:

python3 -m one.two --whatever
Nel mezzo del deserto posso dire tutto quello che voglio.