Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ホスト名を取得
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
You can’t perform that action at this time.