Python Classroom Series – 24/Jul/2021

Build one sample application in python

  • The application which we are building is good old inventory application
  • This application will be used from command line
  • Application code layout Preview
  • Create a new git repository in git hub Preview Preview
  • We need to create this application to be run from any command line
inventory sales
inventory products
inventory --help
  • For this we need to understand the basic way of writing a program which accepts inputs from commandline
    • Basic approach: parse arguments on your own by reading sys.argv Refer Here for the sample.
  • To make it easier for building applications which parse command line args python has a module called as argparse Refer Here

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin