3 ms·
Neat. The way I solved this about a decade ago is to create a base template script for my editor. When I hit Ctrl-N a new main script opens with heading, main
by mixmastamyk 6y ago
Neat. The way I solved this about a decade ago is to create a base template script for my editor. When I hit Ctrl-N a new main script opens with heading, main(), status code return, CLI parsing, and basic logging set up already.
New argparse params are either uncommented and/or cut and pasted from existing ones. It works pretty well.
- nvusuvu 6y agoThat's way cool. What editor do you pull this magic out of?
- mixmastamyk 6y agoGeany, but I don't think it is unique functionality. I suppose you could just copy from a read-only template file with any OS or tools. Now that I look closer, I actually have to use the File menu, it doesn't have a default shortcut assigned.