the-riviera-kid / tortoise-lang

The Tortoise Language (inspired by an exercise in The Pragmatic Programmer)
0 stars 2 forks source link

Add optional verbose mode #22

Open the-riviera-kid opened 3 months ago

the-riviera-kid commented 3 months ago

We want to add a verbose mode to Tortoise. This would print out the name of the program, and the length of the program before executing it. For instance:

python tortoise.py --verbose tiny.tortoise

Executing tiny.tortoise, 3 commands found.
1. PEN 3
2. PEN UP
3. PEN DOWN

The program executes as normal after printing the header line. Another example:

python tortoise.py medium.tortoise --verbose

Executing medium.tortoise, 6 commands found.
--- normal output here ---

If the verbose flag is not given, it should default to False.

This is probably the time to look at something like the argparse module

CarlaBuongiorno commented 3 months ago

It's me :)