Skip to content

Latest commit

Β 

History

History
64 lines (41 loc) Β· 1.33 KB

File metadata and controls

64 lines (41 loc) Β· 1.33 KB

Python Starter Kit

A simple Python console application that processes command-line instructions.


πŸš€ How to Run

1. Run the App

Pass commands as arguments inside quotes to the wrapper script:

python gt_main_wrapper.py '[300,100,200,400]'

βœ… Each string represents a command and its arguments.


πŸ§ͺ Run Tests

Unit tests are located in test_sample.py.

You can run them using the provided bash script or standard Python tools:

./run_unittests.sh
# or
python -m unittest discover -s .

πŸ—‚οΈ Project Structure

.
β”œβ”€β”€ gt_main_wrapper.py  # Driver code to pass arguments (Do not edit)
β”œβ”€β”€ main.py             # Console app source code where logic goes
β”œβ”€β”€ test_sample.py      # unittest test cases
β”œβ”€β”€ run.sh              # Bash script to run the application
β”œβ”€β”€ run_unittests.sh    # Bash script to run tests
└── README.md           # This file

πŸ“Œ Example Commands

python gt_main_wrapper.py '[300,100,200,400]'

python gt_main_wrapper.py '[100]'


πŸ› οΈ Implementation Notes

  • Commands are parsed in main.py β†’ handle(self, input_str).
  • Extend the handle method to implement actual business logic.
  • State can be maintained class variables, dictionaries, or separate helper methods within the Main class.