gemseo / utils

py23_compat module

Python2 and Python3 compatibility layer

gemseo.utils.py23_compat.getargspec(func)[source]

Get arguments specifications.

gemseo.utils.py23_compat.is_py2()[source]

Check if the version of Python is 2.

Returns

True if Python 2.

Return type

bool

gemseo.utils.py23_compat.long(data)[source]

Return a long from data, performs casting

gemseo.utils.py23_compat.next(iterator)[source]
gemseo.utils.py23_compat.string_array(data)[source]

Creates a numpy array of strings from data the dtype is adjusted (bytes in py3, string in py2)

gemseo.utils.py23_compat.to_unicode_list(iterable)[source]

Convert a list of strings to a list of unicode strings.