Script to change ip address on windows

前端 未结 4 1939
名媛妹妹
名媛妹妹 2020-12-02 23:56

I use my computer to communicate with a piece of hardware via ethernet. To communicate with this device I set my ip to 192 168 0 11, subnet mask to 255 255 255 0, and defaul

4条回答
  •  青春惊慌失措
    2020-12-03 00:30

    Actually very simple to do (windows only) (uses preinstalled libraries only):

    import os; os.system("ipconfig /renew")
    

提交回复
热议问题