clanvas icon indicating copy to clipboard operation
clanvas copied to clipboard

Few random cmd2 recommendations

Open tleonhardt opened this issue 7 years ago • 1 comments

I just took a quick look at the clanvas source code and have a few recommendations regarding the use of cmd2 that you may benefit from:

  • Consider loading your resource file via the startup_script optional argument to the cmd2.Cmd initializer
  • Consider also specifying a persistent readline history file in the initializer as well
  • For commands which use one of the argparse decorators, consider using ACArgumentParser from cmd2 instead of argparse.ArgumentParser - it has several benefits when it comes to automatic tab completion
  • As of cmd2 0.9.5, you no longer need to init colorama in your app code, because that is done by cmd2

tleonhardt avatar Oct 13 '18 21:10 tleonhardt

Thanks! Glad to see there are some nice and easy ways to make more improvements thanks to cmd2's simple interfaces.

rowdyrotifer avatar Oct 13 '18 21:10 rowdyrotifer