What does -m, -c, python, nltk.downloader stand for in the below mentioned script?

Page Link:

SCRIPT SAMPLE: 1.$ python -m nltk.downloader twitter_samples 2.$ python -c “import nltk; print(nltk.version)”


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


The -m flag searches the sys.path for the named module and executes its contents as the __main__ module. Here’s a link to the official documentation that goes into more details about the -m flag:

The -c flag executes the Python code in command. A command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. Here’s a link to the official documentation:

Hope that this helps! Regards, Bobby