How to get the current working directory with Python

One can easily find out the current working directory by making use of the Python computer programming language, since it comes with all the utilities required to interact with the functionalities of the operating system.

Before going any further with this tutorial, make sure to launch a new Python interactive console on your own operating system.
Continue reading “How to get the current working directory with Python”

How to create a dictionary in Python and make use of it

There are many builtin objects offered by the Python computer programming language which the Python coder can make use of while writing their Python based applications. Through this simple and short tutorial, you are going to learn how to create a dictionary object and how to make use of it in a practical case, in a real word scenario.

Continue reading “How to create a dictionary in Python and make use of it”

How to change the current working directory with Python

There are times when you have to process information being stored in different directories through your Python based applications. Being rich in features, the Python computer programming language comes with all the utilities one needs to interact with the functionalities provided by the operating system. Continue reading “How to change the current working directory with Python”

How to create a new directory with Python

Being rich in features, Python provides all kinds of utilities required to interact with the functionalities offered by the operating system. The Python coder can easily access and unlock the functionalities offered by his or her operating system through the usage of the builtin os module. Continue reading “How to create a new directory with Python”

How to list all files inside a directory with Python

Being a Python geek, most of the time it happens that I make use of my knowledge to write simple scripts which automate repetitive tasks in my operating system. Rich in features, Python offers many utilities which help the Python coder to interact with the functionalities of the operating system. Based on my personal experience with the Python computer programming language, one of the modules which has packed the utilities that can interact with the operating system, is the os module.
Continue reading “How to list all files inside a directory with Python”

How to remove a directory with Python

When one wants to script their daily computer tasks with the main purpose of automating their stuff, there is a high chance they have to deal with the file system of their operating system, and for sure computer directories. The Python computer programming language, comes equipped with all the utilities the coder needs to interact with the functionalities provided by their operating system.

There are many builtin utilities one can make use of to remove a directory in their operating system. With the main purpose of keeping stuff practical, I highly recommend that you open a new Python interactive console before going any further with this tutorial.
Continue reading “How to remove a directory with Python”

Introduction to the Python os module in a practical way, first part

The operating system is the main reason why your computer hardware is being powered. Without it, one would not be able to write and generate files in Microsoft Office, play games and navigate the internet with the help of a web browser.

Although a very complex software, the operating system functionalities can be easily accessed and used with the help of builtin modules offered by the Python computer programming language, such as the os module. Having experienced with the Python builtin os module, I have come to the conclusion that it deserves some attention through some specific articles about it, because it provides many useful utilities which the Python coder can utilize in their projects that deal with the operating system under the hood. Continue reading “Introduction to the Python os module in a practical way, first part”