labm8¶
Utils for manipulating quantitative experimental data.
-
labm8.
exit
(status=0)¶ Terminate the program with the given status code.
-
labm8.
is_python3
()¶ Returns whether the Python version is >= 3.0.
This is for compatability purposes, where you need to implement different code for Python 2 and 3.
Example
To import the StringIO class:
- if is_python3():
- from io import StringIO
- else:
- from StringIO import StringIO
Returns: True if Python >= 3, else False. Return type: bool