Answers for "use python2 mac"

4

which python mac

$ brew update && brew upgrade python
Posted by: Guest on September-23-2020
3

How to get mac in python

import uuid

mac_address_int = uuid.getnode()  # Get hardware address as 48-bit positive int
mac_address_hex = hex(mac_address_int)  # Create hexadecimal version of mac address

print("MAC address:", mac_address_hex)  # MAC address: 0x00005e0053af
Posted by: Guest on March-29-2022

Python Answers by Framework

Browse Popular Code Answers by Language