The misc.py
module#
Summary#
Determine if a string can be converted to a float. |
|
Generate a random string of a fixed length. |
|
Create a unique working directory in a temporary directory. |
|
Check if an IP address is valid. |
|
Check if a port is valid. |
Description#
Module providing miscellaneous functions and methods.
Module detail#
- misc.is_float(input_string)#
Determine if a string can be converted to a float.
- misc.random_string(stringLength=10, letters=string.ascii_lowercase)#
Generate a random string of a fixed length.
- Parameters:
- stringLength
int
,optional
Length of the string. The default is
10
.- letters
- stringLength
- misc.create_temp_dir(tmpdir=None)#
Create a unique working directory in a temporary directory.
- Parameters:
- tempdir
str
,optional
Name of the temporary directory to create the working directory in. The default is
None
.
- tempdir
- misc.check_valid_ip(ip)#
Check if an IP address is valid.
- Parameters:
- ip
IP address.
- misc.check_valid_port(port, lower_bound=1000, high_bound=60000)#
Check if a port is valid.
- misc.MODULE_PATH#
- misc.base_report_class#