Steps to convert Python to Exe using PyInstaller. These simple steps will convert a Python source code .Py file to executable file that can be distributed to other computers.
Regular Expressions – I
A regular expression (shortened as regex) is an extremely useful way of matching common patterns and texts such as emails, phone numbers, URLs etc. almost all programming languages have a regular expressions library. It is widely used in text editors also to find patterns and replace string patterns that we specify in the […]
[Python] Check if File Exists
How to check if a file exists in path using Python? There are 2 functions available in Python to check this directly using os.path. Try the below Python code snippet. Both functions take same parameter (file path) & return a boolean response. i.e., True if file exists or False if […]
Python Unzip all Files to Directory and Subdirectories
This Python code unzip all files to directories and subdirectories in one step. All files in Zip archive will be extracted corresponding directoy structure.
Get Current Weather in Python – Free Openweathermap Api
Python – Weather Report for any City There is a similar article to this in which the weather report is obtained using Excel Vba code. To use this open weathermap Api , you have to first register with your email and get the AppId key. They provide a free limited […]
Python Sort List Function – Ascending or Descending
Sort Function in Python Code In Python, You can sort a list or array of numbers & strings using the built in function. The code below creates a numeric & string array. Then sorts is ascending & descending. The default is ascending. Lets see how do this with a Python […]
Get list of Folders in directory path – Python
Print Directory List in Python To get list of sub-directories present in a computer folder, use the code below. Edit the folder path mentioned in the variable “folder_path”. Then execute this ready to use code. It will print the sub-directories name one by one. #List all subdirectories in a folder […]
Get list of Installed Packages in Python
Python program to Get list of installed Packages or modules using pip. Also get the cmd prompt command to get the list using pip commands.
How to Install Python in Windows? – Hello World Program
Learn to install Python latest version in your computer, write your first ever Python hello wor;d program, compile & run the program in just few minutes.
How to Zip Directory using Python? – Archive folder
Archive or Zip all files in Directory The code in this page will Zip directory full of files. It will first get folder path as input. Then loop thru the directory & its sub-directories to get all the files list. Then each file in the list is added to the […]