Package prest :: Module main
[hide private]
[frames] | no frames]

Module main

source code

The main file parse the command line and run the program in the desired way.

There's three possible runing options:

Examples of profiling use:

   C{python3 -m cProfile -s time main.py -p '' -l 10}
       -> Simulate the input and predction of ten consecutive inputs of the
          'hello world' string (default string).

   C{python3 -m cProfile -s time main.py -p 'the seasons wither'}
       -> Simulate the input and predction of the 'the seasons wither'
          string.

Notes:

To Do (0.1.0): Add memoize classes and decorators to improve performance.

Functions [hide private]
 
run_profile(string='hello world')
Initialize the Driver instance and start a cmdl REP loop.
source code
 
run_cmdl()
Initialize the Driver instance and start a cmdl REP loop.
source code
 
run_gui()
Initialize the Driver instance and run the gui.
source code
 
usage()
Print the usage message.
source code
 
main()
The main function of the program.
source code
Variables [hide private]
  CONFIG_FILE = 'profile.ini'
Path of the config .ini file to use, if empty a default config will be used
Function Details [hide private]

main()

source code 

The main function of the program.

Take care of the command line options and run the program (gui or command line) or print the help.