utok module

Python interpretation of utok.

utok.main()[source]

Main entry point for command line.

Printing the result string.

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.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