Skip to content

SuvamHere/Resolution

Repository files navigation

Making CLIs with Argparse

This project demonstrates how to build Command-Line Interfaces (CLIs) in Python using the argparse module. It shows how to create interactive scripts that accept inputs from the terminal in a user-friendly way.

Features

  • Accept command-line arguments and options
  • Display helpful usage messages
  • Handle input errors gracefully
  • Examples of practical CLI scripts

How It Works

The project uses Python's argparse module to:

  1. Define commands, arguments, and flags
  2. Parse user input from the terminal
  3. Execute actions based on the provided arguments
  4. Display help and error messages automatically

How to use

Open terminal in Resolution/src/resolution_week1_suvamhere Then, in the terminal, do as shown in the example usagee

Example Usage

(Use Python3 for Linux and python for Mac/Windows)

python3 main.py "Coding"

python3 main.py --help p #for help
python3 main.py --c  #for use after completing a task
python3 main.py --delete  id_no>gt;#to delete any id
#to delete any idete any idy id" tabindex="0" role="button">

About

Built a CLI with Argparse to create interactive scripts that accept inputs from the terminal in a user-friendly way.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages