[Tutor] Multiple front-ends in project

trent shipley trent.shipley at gmail.com
Fri Jun 23 13:11:13 EDT 2023


I have written the simple core logic for a dice rolling program.  It is In
./app/core.  I am planning to add more complex helper classes in
separate files to do more complex things like rolling different kinds of
dice in one throw, or exploding dice.

I plan four interfaces, two CLI, and two GUI.

   1. A pretty simple CLI with just the basic core functionality.
   2. A small DSL for rolling dice, with support for complexities like
   using pre-provisioned numpy probability functions and using in one throw,
   re-rolls if a result is in a certain range and so on.
   3. A GUI meeting common requirements for role-playing games.
   4. A "Scientific GUI" with some, but not all, of the power of the
   command line and scriptable DSL.

*Buried Lead:*
I am now working on #1 the Simple CLI.  ** How do I arrange things so I can
run ./app/cli/simple_cli/simple_hdroll_cli_main.py as "$
python3 shdroll kwargs"? **

Looking to the future, how do I package and distribute my project so it can
be used conveniently on all three OSes per my design intent.  (The command
line interfaces work like command line commands, The DSL can interpret and
run scripts, and the GUIs act like native GUI programs for all three OSes.
 (I am developing on Linux Mint.))



(venv) trent at trent-virtual-machine:~/pythonworkspace/hackable_dice_roller$
tree --gitignore > ../hdr_tree.txt

.
├── app
│   ├── cli
│   │   ├── dice_dsl
│   │   ├── __init__.py
│   │   └── simple_cli
│   │       ├── __init__.py
│   │       ├── simple_hdroll_cli_main.py
│   │       └── simple_hdroll_cli_parser.py
│   ├── core
│   │   ├── hackable_dice_roller.py
│   │   ├── __init__.py
│   ├── gui
│   │   ├── scientific_gui
│   │   └── simple_gui
│   ├── __init__.py
│   └── tests
│       ├── cli
│       │   ├── dice_dsl
│       │   └── simple_cli
│       │       └── __init__.py
│       ├── core
│       │   ├── __init__.py
│       │   ├── test_hdr_core.py
│       │   └── test_hdr_core_visually.py
│       └── gui
│           ├── scientific_gui
│           └── simple_gui
└── __init__.py

20 directories, N files


More information about the Tutor mailing list