Python Tutorial

How to Read and Write To/From Files in Python

Submitted by Yorkiebar on
Introduction: In this tutorial, we are going to be covering handling files in Python. Generic: To read or write from/to a file, we first need to create a stream. To do this we use the Python function 'open' which takes two parameters, the file, and the mode. The file should a file name (including directory location if it is not in the same directory as the current program) as a string, while the mode should also be a string. Don't forget to replace any backslashes in the directory with two backslashes to avoid Python escape character problems.

Creating a Simple GUI in Python

Submitted by Yorkiebar on
Introduction: This tutorial is going to be on how to create a GUI in Python using Tkinter. Tkinter: Tkinter is a basic package to give your projects a simple GUI with the essential GUI elements such as textboxes, checkboxes, buttons and more. Our Program: Our program is going to be a simple program where the user enters text in to a textbox, then clicks a button to get it output to the console.