Created
February 7, 2017 00:46
-
-
Save austinschwartz/1ca8e5359041429e2bd2d5837766bc94 to your computer and use it in GitHub Desktop.
Tells you what lab you're in @ Purdue (Haas/Lawson)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import socket | |
host=socket.gethostname().split(".")[0] | |
if host.startswith("pod"): | |
print("LWSN B148") | |
elif host.startswith("xinu"): | |
print("HAAS 257") | |
elif host.startswith("borg"): | |
print("HAAS G040") | |
elif host.startswith("moore"): | |
print("LWSN B146") | |
elif host.startswith("sslab"): | |
print("LWSN B158") | |
elif host.startswith("escher"): | |
print("HAAS G056") | |
else: | |
print("???") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment