Difference between revisions of "Python"
(→Related links: WCurses link is 404. Changed to current link. Added info about the (currently) unofficial Curses port for windows Python) |
|||
Line 35: | Line 35: | ||
* [http://www.python.org/doc/faq/ Official Python FAQs] | * [http://www.python.org/doc/faq/ Official Python FAQs] | ||
* [http://sourceforge.net/apps/wordpress/pyunicurses/ UniCurses for Python], a Python wrapper module that provides consistent [[Curses]] functionality on all platforms including Microsoft Windows (by wrapping PDCurses), Linux and Mac OS X (by wrapping the original "curses" module). It supports both Python 2 and Python 3, starting with version 2.6.1. | * [http://sourceforge.net/apps/wordpress/pyunicurses/ UniCurses for Python], a Python wrapper module that provides consistent [[Curses]] functionality on all platforms including Microsoft Windows (by wrapping PDCurses), Linux and Mac OS X (by wrapping the original "curses" module). It supports both Python 2 and Python 3, starting with version 2.6.1. | ||
* [http:// | * [http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses Python], unofficial Curses for Windows Python, based on PDCurses. Has 32b and 64b binaries. Tiny and easy to install. Better alternative to WCurses. | ||
* [http://code.google.com/p/wcurses/ WCurses], a Python module implementing a substantial subset of the [[Curses]] interface under Windows. You'll have to compile it yourself as adamv no longer issues binaries. Python includes Curses support by default for other OS's. | |||
* [http://doryen.eptalys.net/libtcod/ Doryen Library], libtcod is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console emulator, input, and lots of other utilities frequently used in roguelikes. | * [http://doryen.eptalys.net/libtcod/ Doryen Library], libtcod is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console emulator, input, and lots of other utilities frequently used in roguelikes. | ||
* [http://psyco.sourceforge.net/ Psyco], the specializing compiler for Python. Improves performance 2 to 100 times (usually about 4 times), and requires little more from the programmer than to import the module and execute <tt>psyco.full()</tt>. | * [http://psyco.sourceforge.net/ Psyco], the specializing compiler for Python. Improves performance 2 to 100 times (usually about 4 times), and requires little more from the programmer than to import the module and execute <tt>psyco.full()</tt>. |
Revision as of 18:46, 18 February 2011
Python | |
---|---|
Programming Language | |
Company | Python Software Foundation |
Influences | ABC programming language |
Updated | Feb 13 2009 (3.0.1) |
Status | Stable |
Licensing | Open Source (Python 2.6.2 license) |
Platforms | Linux, Unix, Mac OS X, Windows and others. |
Official site of Python |
What is Python?
From the official Python FAQ:
"Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on PCs under MS-DOS, Windows, Windows NT, and OS/2."
A full set of features can be found here.
Roguelike Specific Details
Python's expressive code, dynamic typing, flexible data types, and powerful OO and exception handling facilities make it well-suited to quick, productive RL development. However, like all interpreted languages, Python has a reputation for large memory overheads and being slower in some applications when compared to compiled languages such as C++. These problems, however, can be overcome with the extension of third-party Python modules such as Psyco, and proper profiling and programming techniques. Another problem is that Python often requires the user to download an interpreter separately. A way to solve that is to include the interpreter in the game download.
Python's rapid speed of development and human-readable code makes it an excellent choice for programmers wanting to develop a roguelike in a limited amount of time, making the language ideal for 7DRL Challenges.
Python-Specific Articles on RogueBasin
- Complete Roguelike Tutorial, using python+libtcod
- Python_shadowcasting_implementation - Python code for field-of-view calculation using Bjorn Bergstrom's excellent recursive shadowcasting algorithm.
- Permissive_Field_of_View_in_Python - An implementation of the precise Permissive Field of View algorithm in Python.
- Dungeon_builder_written_in_Python - A dungeon builder.
- A simple turn scheduling system -- Python implementation - A simple time system for rouguelikes.
Related links
- Official Python website
- Official Python FAQs
- UniCurses for Python, a Python wrapper module that provides consistent Curses functionality on all platforms including Microsoft Windows (by wrapping PDCurses), Linux and Mac OS X (by wrapping the original "curses" module). It supports both Python 2 and Python 3, starting with version 2.6.1.
- Python, unofficial Curses for Windows Python, based on PDCurses. Has 32b and 64b binaries. Tiny and easy to install. Better alternative to WCurses.
- WCurses, a Python module implementing a substantial subset of the Curses interface under Windows. You'll have to compile it yourself as adamv no longer issues binaries. Python includes Curses support by default for other OS's.
- Doryen Library, libtcod is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console emulator, input, and lots of other utilities frequently used in roguelikes.
- Psyco, the specializing compiler for Python. Improves performance 2 to 100 times (usually about 4 times), and requires little more from the programmer than to import the module and execute psyco.full().
- py2exe is a package which converts Python scripts into executable Windows programs, able to run without requiring a Python installation. Since most Windows users will not have Python installed, py2exe is a good way to distribute your Python game to that audience.
- Pygame, Pygame is an SDL wrapper for Python that has been used for many graphical and non-graphical Roguelikes.
- with_curses, just a tiny bit of help for Linux/Unix roguelikes.
Roguelike games in Python
- βeta Artisan
- αlpha CrashRun
- αlpha CyberRogue
- 7DRL Cypress Tree Manor
- 7DRL Fist of the Rogue Warrior
- αlpha Ighalsk
- defunct I, Monster
- αlpha Lands of Elderlore
- βeta Mines of Elderlore
- βeta Nyctos
- αlpha Pyro
- αlpha Shuruppak
- βeta Test Adventure
- αlpha Torchlit
- αlpha Twilight
- αlpha Wa
- 7DRL Whispers in the Void
- 7DRL Z-Day