Posts by Matheus Leite • 127 points
3 posts
-
3
votes1
answer193
viewsQ: How to mount a Regex to identify the state of the interfaces
Using the command ip link show in the terminal I get the following text: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000link/loopback…
-
4
votes1
answer421
viewsQ: Python - How to get the output of running a . py file to a . txt
I have the following command: python3 -u teste.py > saida.txt 2>&1 This command causes the execution output of the teste.py be sent to this file saida.txt, case saida.txt does not exist it…
-
4
votes2
answers2017
viewsQ: Python - How to build a good function to check for internet?
The idea is to build a small function to check if there is an internet connection. I have a draft of a function that uses the library socket, but I do not believe that this is the most efficient way…
python-3.xasked Matheus Leite 127