Loading ccnode/utils.py +10 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- import os, sys, subprocess from socket import gethostname, gethostbyname from threading import Lock def enum(*sequential, **named): Loading Loading @@ -179,3 +180,12 @@ class Exec(object): ''' return Exec.call(cmd, shell=shell, capture_output=False)[0] class Net(object): ''' ''' @staticmethod def myaddr(): ''' ''' return gethostbyname(gethostname()) Loading
ccnode/utils.py +10 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- import os, sys, subprocess from socket import gethostname, gethostbyname from threading import Lock def enum(*sequential, **named): Loading Loading @@ -179,3 +180,12 @@ class Exec(object): ''' return Exec.call(cmd, shell=shell, capture_output=False)[0] class Net(object): ''' ''' @staticmethod def myaddr(): ''' ''' return gethostbyname(gethostname())