Breaking News
Home / Python

Python

Game development in Python

python-game-dev1

The scripting language Python is easy to use, and thus very convenient to program simple games. And to make it even simpler, there one Python module which is dedicated to games creation: pygame. It makes you life much easier when programming a game as it takes care of the user …

Read More »

How to check the version of MySQL database using Python?

#!/usr/bin/python # -*- coding: utf-8 -*-   import MySQLdb as mdb import sys   con = None   try:       con = mdb.connect(‘localhost’, ‘username’,         ‘password’, ‘dbname’);       cur = con.cursor()     cur.execute("SELECT VERSION()")       data = cur.fetchone()     …

Read More »

What are Micro Frameworks for Python Web Development?

What are Micro Frameworks? • Minimalist approach that helps to python websites • Examples – Bottle.py, Flask, Cherry Python, many others • Maps URL routes to Python function calls: –Request Routing (URL definition) –Request Parsing & Validation –Returning Content (files, errors, cookies, etc) • Can be extended with plug-ins… –HTML …

Read More »

[Errno 13] Permission denied: when installing CherryPy Python Framework

Common Issue mymac:CherryPy-3.2.2 mvohra$ python setup.py installrunning installerror: can’t create or remove files in install directory The following error occurred while trying to add or remove files in theinstallation directory:     [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/test-easy-install-34206.write-test’ The installation directory you specified (via –install-dir, –prefix, orthe distutils default setting) was:     …

Read More »

A StopWatch Game in Python

python-stop-watch

Project Build a simple digital stopwatch that keep track of the time in tenths of a second.  The stopwatch should contain “Start”, “Stop” and “Reset” buttons.  To help guide you through this project, we suggest that you download the provided program template for this project and build your stopwatch program …

Read More »
Advertisment ad adsense adlogger