python script for enquiring the version of multiple operating systems
Question: I am new to python, looking to write a script which would ssh to about 1000
hosts from a jump server and Output should contain the hostname and version of
the operating system. Redhat 5.0 or 6,0 etc and I have list of all the hosts
and so the script can keep getting hostname from the hosts list. Is it
possible using paramiko and platform modules ??.. I would really appreciate if
someone could give a rough frame for getting me started. or similar script.


Answer: The `socket` and `platform` can do this.

    
    
    import socket
    import platform
    
    print socket.gethostname()
    print platform.platform()
    

