utok module

Python interpretation of utok.

utok.get_parser()[source]

Define the command lien parser for utok.

Returns

Command line argument parser for utok.

Return type

ArgumentParser

utok.utok(tokens, delimiter=':', delete_list='')[source]

Process token.

The token chains are splitted at delimiter into tokens, and then the tokens joined again using delimiter after removing double tokens.

Parameters
  • tokens (list[str]) – List of strings representing tokens chains.

  • delimiter (str) – Character used to construct token chains.

  • delete_list (str) – Chain of tokens to be deleted from tokens.

Returns

Token chain with all tokens.

Return type

str

utok.prog()[source]

utok [-s delimiter] [ tokens...  [-d delete-list ] tokens...]

Processing the command line arguments and executing the joining of the elements.

Returns

Newly constructed string.

Return type

str

utok.main()[source]

Main entry point for command line.

Printing the result string.