network control in python