Using Python – Check if file exists in a path Python is a versatile programming language that is widely used for a variety of tasks. One of the common tasks is to check if a file exists in a specific path. In this article, we will discuss how Python check […]
Python Unzip all Files in Directory – in just 4 Lines – Easy Code
This Python code unzip all files to directories and subdirectories in one step. All files in Zip archive will be extracted corresponding directoy structure.
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 […]
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 […]
How to run Exe from Python – 3 Easy methods?
Learn how to run exe using Python program with few of the easy methods available. One is subprocessa nd other is directly using OS Library.
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 […]
Fiverr Disabled – Issues with Freelancer Sites – My Experiences
Best Freelance Platforms As usual I signed up with lot of freelance websites like Upwork, Guru, Remote, Fiverr & Freelancer Out of all these, Fiverr worked out very well for more than a Year back in 2018. You can also make lot of money from these websites, just like how […]
Python Program To Check Palindrome
Get the Python code snippet to check whether the string passed as parameter is Palindrome or not.