A menu-based script generator
Project description
Script for Creating a Menu-Driven Python Script
This script allows you to create a simple menu-driven Python script with options specified by the user. The resulting script will be saved as a .py file and can be run from the command line.
Note
Do not use only numbers as your menu names. You can have a1 as a menu name but not 1
How to Use
- Run the script in your terminal or command prompt.
- Enter a name for your script (without the .py extension).
- Enter the number of menu options you want to include.
- For each option, enter a name for the option (cannot be "exit").
- The script will generate a .py file with the specified name and menu options.
- Run the generated script from the command line and choose your desired option.
Dependencies
This script requires the os module, which is included in the Python standard library.
Functionality
The generated Python script will display a menu of options based on the input provided during script creation. Each option will be numbered, and the user can enter the corresponding number to select an option. The generated script will include a separate function for each option, with the name option_i where i is the option number. Each function will print a message indicating which option was selected, then prompt the user to press enter to return to the main menu. If the user enters "exit" at the main menu, the script will terminate.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for menuscript-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fa37f5aeeacd6a7cacab5be42cdc1d5db7c1783efe59a6104de0cd03e759007 |
|
MD5 | 957d71fc5931ac14b2a5b0badbeabcec |
|
BLAKE2b-256 | 2b3886d25736b4a354cfade0292a1b405486977136f7cafb3b5ad563c8a09be0 |