Python

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.

PyWeek: Python Game Programming Challenge Contest

Submitted by navajocodetalker on
The Python bi-annual contest, more popularly known as PyWeek or the Python Game Programming Challenge is now open for registration. The Pyweek is a challenge to write a game using Python will starts its registration this coming April 14 while the voting for the theme will commences on April 7. Richard Jones was the main man behind the establishment of Pyweek during the year 2005. The contest