How to run a .exe file using Python?

import sys, string, os os.popen(r”path”) To run the outside executable file in your computer through Python, this is the easiest way. You need to download an executable file and save it in a folder. Write the exe file path in the code above given. Now you can run the executable […]

How to shutdown a computer using Python?

import os os.system(‘shutdown -s’) This coding for shutdown the computer eventually. After running this code, a message saying “You are about to be signed out in less than a minute” We can avoid that message – os.system(‘shutdown -s -t 0’) instead of using os.system(‘shutdown -s’) will immediately get shut down.

How to get username in Python?

Print Current User Account Name in Python Here is the simple way to get the user name by using python code. Note: It is adviced not to use this function for any authorization purpose as this can be manipulated. Because the getpass reads the data from environment variables (LOGNAME or […]

Python To Read Word Document – DataFrame

Python Program to read a book (docx Word document) & store it in a DataFrame in Python. Problem Statement: Following code will read a book from the system in a document form and store it in a dataframe in Python. Solution: Step 1: Convert a pdf book into .docx format. […]

Install TensorFlow in Python

This tutorial tells how to install Tensorflow in the prebuilt configuration in both Windows 10 and Ubuntu 16.04(for both CPU & GPU) Currently, 64-bit Python only supported Tensorflow. Install CPU Version on Ubuntu & Windows For Ubuntu 64bit OS First Process is to install CPU Version of TensorFlow. CPU version […]