Sep-05-2018, 08:41 AM
(This post was last modified: Sep-05-2018, 08:41 AM by Gribouillis.)
Functions that print are mainly useful for the final user of your code, but not so for the rest of your program. Useful functions don't print something, they return something. For example they can return a boolean value
def system_is_windows(): return sys.platform in ('win32', 'windows') def system_is_linux(): return sys.platform.startswith('linux') def unzipfiles(): ... if system_is_windows(): ... elif system_is_linux(): .... else: raise NotImplementedError('Function unzipfiles() is not yet implemented on this OS') ...By the way, use python 3!