cc1
v2.1
CC1 source code docs
|
Classes | |
class | ServerProxy |
Functions | |
def | ip_itos |
Convert ip from long-integer to standard, human-readable form. | |
def | ip_stoi |
Convert ip from human-readable form to long-integer. | |
def | ip_stomac |
Convert ip from string to mac address. | |
def | json_convert |
Convert object to json format. | |
def | password_gen |
Generates random password of given length. | |
def | subcall |
def | xml2dict |
A simple function to converts XML data into native Python dictionary. |
Variables | |
current | |
root | |
stack | |
text_parts |
def src.common.utils.ip_itos | ( | ip_int | ) |
def src.common.utils.ip_stoi | ( | ip | ) |
def src.common.utils.ip_stomac | ( | ip | ) |
def src.common.utils.json_convert | ( | o | ) |
def src.common.utils.password_gen | ( | length, | |
chars = ['letters' , |
|||
digits, | |||
special, | |||
extra_chars = None |
|||
) |
Generates random password of given length.
The password consists of symbols drawn from the set of specified character groups (chars
) and (optionally) of extra characters specified in (extra_chars
).
length | (int ) length of the requested password |
chars | (list(string) ) may contain letters, digits, or special. |
extra_chars | (list(char) ) list of extra characters for password composition. |
string
) password composed of length
symbols picked from specified character set def src.common.utils.subcall | ( | command, | |
log = None , |
|||
err_log = None , |
|||
std_log = None , |
|||
err_msg = None , |
|||
err_exit = True |
|||
) |
def src.common.utils.xml2dict | ( | src | ) |
A simple function to converts XML data into native Python dictionary.
src | xml file content or stream Adds to <b>\c data</b> dictionary key named <b>\c name</b> with value <b>\c value</b>. If <b>\c name</b> key with single-value already exists in <b>\c data</b> key, it's converted into list. If it's already converted into list, yet another value is added. @param data <i>(\c dict)</i> to which dictionary key should be added @param name <i>(\c string)</i> name of the key @param value <i>(\c string)</i> value of the key |