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:
-
-c or --cmdl: Run the program using the command line interface (not
really suitable)
-
-g or --gui: Run the program using the graphic user interface.
-
-p or --profile: Simulate the predictions computation for a sample
string and print the profiling statistics for the session. This is
useful to see what part of the program took the largest part of the
program's execution time.
Examples of profiling use:
tipy -p '' -l 10
-> Simulate the input and predction of ten consecutive inputs of the
'hello world' string (default string).
tipy -p 'the seasons wither'
-> Simulate the input and predction of the 'the seasons wither'
string.
Notes:
-
You must specify your own test string after -p or --profile, if
none are specified a default one will be used.
-
The option -l or -loop indicate how many times the profiling
operation have to be carried out.
To Do (0.1.0):
Add memoize classes and decorators to improve performance.
|
set_config_file()
Look for the best directory where a config file can be. |
source code
|
|
|
run_profile(string=' hello world ' ,
profileLoops=1)
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 |
source code
|
|
|
|
|
|
|
CONFIG_FILE = '
'
|
|
__package__ = ' tipy '
|
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.
|