|
Size: 309
Comment:
|
Size: 430
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
Well, sometimes. A lighter-weight variant that sometimes is desirable is {{{import os; print os.uname()[1]}}} |
Description
This is a simple ["Powerful Python One-Liners"]. It prints the systems's hostname to the screen.
Code
from socket import gethostname; print gethostname()
Download
This program has been uploaded to the Wiki. You can download it as an attachment from this page.
Well, sometimes. A lighter-weight variant that sometimes is desirable is
import os; print os.uname()[1]
