I'm a newbie in Python. And I don't know how to run a python package with only one command line. I have been searched it on GG but I have no key-word. There is my folder:
├── config.json
└── my_source
├──__init__.py
├──filter.py
└──get_new_users.py
And config.json contains 3 parameters and able change by the user. So, I want to run this my_source package with one command line like this:
my_source -c config.json
Could I able to run my code in this way? If it's possible. Could anyone give me a key-word or a way to do it? If you need more info, please leave a comment. Thank you.
To run a python module/package specify the -m flag.
For example in your situation it will be something like:
python -m my_course.filter
See this SO question for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With