24 HtmlWriter, NormalizedDict, timestr_to_secs, secs_to_timestr, normpath,\
25 unic, asserts, unescape, html_escape, attribute_escape, robottime,\
26 get_timestamp, Matcher, is_list_like, is_dict_like, system_decode,\
27 ArgumentParser, get_error_details, is_unicode, is_string, py2to3
28 from .eventhandler
import RideFSWatcherHandler
29 from .printing
import Printing
33 return robotide.lib.robot.utils.html_format(text)
37 cls = inspect.isclass(item)
and item
or item.__class__
39 if drop
and name.endswith(drop):
40 name = name[:-len(drop)]
52 return value.split(sep)
55 for item
in value.split(sep):
56 bslash_count = len(item) - len(item.rstrip(
'\\'))
57 escaped = bslash_count % 2 == 1
64 catenate_next = escaped
71 return joiner.join([v.replace(sep,
'\\' + sep)
for v
in value])
75 for dirpath
in sys.path:
76 if not os.path.isdir(dirpath):
78 path = os.path.join(dirpath, name)
79 if os.path.isfile(path):
85 base = path.rsplit(
'.', 1)
86 return '%s.%s' % (base[0], new_extension.lower())
96 def overrider(method):
97 assert(method.__name__
in dir(interface_class))
103 return os.path.splitdrive(path1)[0].
lower() == \
104 os.path.splitdrive(path2)[0].
lower()
108 cmd = [sys.executable,
'-{0}'.format(mode)] + command
110 process = subprocess.Popen(
112 stdout=subprocess.PIPE,
113 stderr=subprocess.PIPE)
114 output, _ = process.communicate()
122 enc = sys.stdout
and sys.stdout.encoding
or "utf-8"
123 data_type =
type(data)
125 if data_type == bytes:
127 return str(data.decode(enc))
128 return data.decode(enc)
129 if data_type
in (str, int):
132 if data_type == dict:
134 return data_type(map(converttypes, data))
def printable_name(string, code_style=False)
Generates and returns printable name from the given string.
def replace_extension(path, new_extension)
def is_same_drive(path1, path2)
def overrides(interface_class)
A decorator that can be used to validate method override.
def converttypes(data, prefer_str=True)
Convert all types from Python2 to Python3.
def _split_value(value, sep)
def run_python_command(command, mode='c')
def name_from_class(item, drop=None)
def join_value(value, sep='|', joiner=None)
def find_from_pythonpath(name)
def split_value(value, sep='|')