A Python cffi port of libtcod.
Project description
About
This is a Python CFFI port of libtcod, this is an offshoot of the python-tdl project and has been made into it’s own package. Both projects are still developed together, and this module provides functions specifically to be used by python-tdl.
This library is hosted on GitHub: https://github.com/HexDecimal/libtcod-cffi
Any issues you have with this module can be reported at the GitHub issue tracker: https://github.com/HexDecimal/libtcod-cffi/issues
python-tdl is a port of libtcod made to be “Pythonic”, you can find it here: https://github.com/HexDecimal/python-tdl
And libtcod is here: http://roguecentral.org/doryen/libtcod/
Installation
The latest Windows installer can be found on PyPI: https://pypi.python.org/pypi/libtcod-cffi
If it’s available you can use pip instead by running the command:
pip install libtcod-cffi
This module can also be manually installed by going into the “setup.py” directory and running the command:
python setup.py install
This will require setuptools which you can find here: https://pypi.python.org/pypi/setuptools It also requires that your Python installation is set up to compile binaries.
Usage
This module was designed to be backwards compatible with the libtcod.py script that was distributed with libtcod. If you had code that runs on the original module you can use this library as a drop-in replacement like this:
import tcod as libtcod
Guides and Tutorials for the original library should also work with this one. When possible, using PyPy will give the best performance, and is highly reccomended.
Requirements
Python 2.7+ or 3.2+
32 bit Windows, 32/64 bit Linux, or Mac OS/X (64 bit architecture)
An up-to-date version of python-cffi: https://pypi.python.org/pypi/cffi
Linux will require libsdl1.2, libsdl1.2-dev, libpng, zlib, libffi-dev, and python-dev packages
License
libtcod-cffi is distributed under the Simplified 2-clause FreeBSD license. Read LICENSE.txt, and the tcod/lib/README’s for more details.
Changelog
- 0.2.6
Added requirements.txt to fix a common pip/cffi issue.
Provided SDL headers are now for Windows only.
- 0.2.5
Added /usr/include/SDL to include path
- 0.2.4
Compiler will now use distribution specific SDL header files before falling back on the included header files.
- 0.2.3
better Color performance
parser now works when using a custom listener class
SDL renderer callback now receives a accessible SDL_Surface cdata object.
- 0.2.2
This module can now compile and link properly on Linux
- 0.2.1
console_check_for_keypress and console_wait_for_keypress will work now
console_fill_foreground was fixed
console_init_root can now accept a regular string on Python 3
- 0.2.0
The library is now backwards compatible with the original libtcod.py module. Everything except libtcod’s cfg parser is supported.
- 0.1.0
First version released
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for libtcod_cffi-0.2.6-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 102873d41aa486ae93f6019fa1f0164e17ecae731e50bb08612dbf4740bba1f5 |
|
MD5 | 6965884d92217b0a01297b20cac47847 |
|
BLAKE2b-256 | fa798eeaab4d27f8b1c95815e6aa23acdaaed7f9ffe39393f81f4bdb6e1e99ea |
Hashes for libtcod_cffi-0.2.6-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4e5a40a63c565ec8704e0b9b9d9b69fba6c9b0115f297b9229518f8d3862181 |
|
MD5 | 8809a10589fa4874390c40033a4d9adf |
|
BLAKE2b-256 | 5f41d4fc22cf408795f4ddb99b7724e10f95ade07db5c7adc339536abbedcbad |
Hashes for libtcod_cffi-0.2.6-cp32-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da4e7bc470ce5825ef6426d9561b739cc4950a2d322225260aa7961b35e24a95 |
|
MD5 | cee9367b8f4face62741ae60eb3167e8 |
|
BLAKE2b-256 | f7785a859f1bd53df0ed2026576753cdba81e98a6aea3d3f4da9c8a2c9d46876 |
Hashes for libtcod_cffi-0.2.6-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d47802c0e2dd70393cd1b73265fc31f321d79c5792a9c80980ce36f6fb982550 |
|
MD5 | f25c3b0f9749ba50edcdb9cf518bbcb1 |
|
BLAKE2b-256 | 2dafa3a7d4c10aa2eb5aeb1474ba78c44292dc83138e5642e32de685f9aaf118 |
Hashes for libtcod-cffi-0.2.6.win32-py3.4.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96b3d0a7b913943be1ef3b4960be575644ed16ea0ef7779d4de9d17c2ff2b542 |
|
MD5 | cbfe40c5a763c56c80d4ac5368579ecb |
|
BLAKE2b-256 | 38ed23e5ddf453a52d4d0fa0a8a6ffe5ba15115238b15eee2a3a26ad79b933fc |
Hashes for libtcod-cffi-0.2.6.win32-py3.3.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | b354dfefa335f5a9109185442b3365a556f78109441f599a3cd654a6da2256e4 |
|
MD5 | 2f8b2869be07b83393bf3a875f4a01ff |
|
BLAKE2b-256 | 1c8464af9cfab30bb6b28b5904301d3586587cf9952a033e6053b2840a26e91b |
Hashes for libtcod-cffi-0.2.6.win32-py3.2.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e690d9c646e20605dd55ce026212683b3677075af70d8d3ec02af12166fbe8 |
|
MD5 | 863fd2a00330a19a091013f0c80e4ce5 |
|
BLAKE2b-256 | 458095e7a89271cb6569e30828e86cbcccb34b6856c9d1d87e733d452664d41f |
Hashes for libtcod-cffi-0.2.6.win32-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 844fab15da820195ae7f6a66ca2498ae56531752f9d9ff69205b7739bff6d9e4 |
|
MD5 | dd041933ed8b7cca81fd4f602af37e22 |
|
BLAKE2b-256 | 7571680a3fb3d3742b1183fc219826a09f1ae94a05c1943448118cda797bf316 |