Python code to find : device name, device IP address, hexadecimal IP address and device mac address.

import socket import uuid hostname = socket.gethostname() IPAddr = socket.gethostbyname(hostname) hexIP = socket.inet_aton(IPAddr).hex() macAddr = ':'.join(['{:02x}'.format( (uuid.getnode() >> elements) & 0xff) for elements in range(0,2*6,2)][::-1]) print("Your Computer Name is: " + hostname) print("Your Computer IP Addreress is : " + IPAddr) print("Your Computer hex IP is: " + hexIP) print("Your Computer Mac Address is: "... Continue Reading →

Convert Python file to .exe

If you want to give a Python application to another person who doesn’t have the python interpreter on their computers, you have to create an executable (exe) file. After you do this, you can send them only a single file, and the application will work correctly. steps to convert .py to .exe pip install pyinstaller... Continue Reading →

Start a Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started