Although Python doesn't have the C pre-processor, I wonder, what's a way to declare methods and variables depending on the OS? Something like:
class C1:
#if defined(WINDOWS)
self.var1 = 1
def method1(....):
pass
#elif defined(LINUX)
self.var2 = 1
def method2(....):
pass
#endif
My question isn't how to detect the platform only. But how to define different methods and variables depending on it also.