MCPcopy Index your code
hub / github.com/python/cpython / _node

Function _node

Lib/platform.py:643–656  ·  view source on GitHub ↗

Helper to determine the node name of this machine.

(default='')

Source from the content-addressed store, hash-verified

641 return re.sub(r'-{2,}', '-', platform).rstrip('-')
642
643def _node(default=''):
644
645 """ Helper to determine the node name of this machine.
646 """
647 try:
648 import socket
649 except ImportError:
650 # No sockets...
651 return default
652 try:
653 return socket.gethostname()
654 except OSError:
655 # Still not working...
656 return default
657
658def _follow_symlinks(filepath):
659

Callers 1

unameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…