Commit a0e12265 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

add: networking utils

parent 6cd53d1e
Loading
Loading
Loading
Loading
+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):
@@ -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())