Last active
October 26, 2017 09:57
-
-
Save suganoo/679e2a3d11f8fa7783ab070dbb7eebb3 to your computer and use it in GitHub Desktop.
ホスト名を取得
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
import socket | |
import os | |
import platform | |
print socket.getfqdn() | |
# 以降は同じみたい | |
print socket.gethostname() | |
print os.uname()[1] | |
print platform.uname()[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment