Description

Very basic script, with no particular feature used.

Code

1
2
3
4
5
6
7
8
9
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from tinyscript import *


if __name__ == '__main__':
    parser.add_argument("string", help="string to be displayed")
    initialize()
    logger.info(args.string)

Help

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ python simple-script.py -h
SimpleScript

usage: simple-script [-h] [--help] [-v] string

positional arguments:
  string         string to be displayed

extra arguments:
  -h             show usage message and exit
  --help         show this help message and exit
  -v, --verbose  verbose mode (default: False)

Execution

1
2
$ python simple-script.py "Hello World!"
12:34:56 [INFO] Hello World!