I want to write a script that will execute on Linux and Solaris. Most of the logic will be identical on both OS, therefore I write just one script. But because some deployed str
if 'linux' in sys.platform:
def do_stuff():
result = # do linux stuff
more_stuff(result)
elif 'sun' in sys.platform:
def do_stuff():
result = # do solaris stuff
more_stuff(result)