Coverage for pyguymer3/hostname.py: 33%

3 statements  

« prev     ^ index     » next       coverage.py v7.9.2, created at 2025-07-08 18:47 +0000

1#!/usr/bin/env python3 

2 

3# Define function ... 

4def hostname(): 

5 # Import standard modules ... 

6 import socket 

7 

8 # Get (potentially fully-qualified) hostname and return the first part ... 

9 return socket.gethostname().split(".")[0]