pydelta.intkey | index pydelta/intkey.py |
This module is capable of reading data from the binary intkey file formats.
It returns a pydelta.Delta object, which can be used like a loaded DELTA file.
Usage example:
from pydelta import intkey
# N.B. Downloading and parsing the data may take a few seconds.
grassgen = intkey.webload("http://delta-intkey.com/grass/webstart.ink")
print len(grassgen.chars), "Characters:"
for char in grassgen.chars:
print char.feature, len(char.states)
print "\n",len(items), "Items:
for item in grassgen.items:
print char.name,
if 9 in char.attributes:
print char.attributes[9].replace("1","annual").replace("2","perennial")
else:
print
Modules | ||||||
|
Classes | ||||||||||
|
Functions | ||
|
Data | ||
CT = {1: 'UM', 2: 'OM', 3: 'IN', 4: 'RN', 5: 'TE'} bitvalues = {'\x00': [False, False, False, False, False, False, False, False], '\x01': [True, False, False, False, False, False, False, False], '\x02': [False, True, False, False, False, False, False, False], '\x03': [True, True, False, False, False, False, False, False], '\x04': [False, False, True, False, False, False, False, False], '\x05': [True, False, True, False, False, False, False, False], '\x06': [False, True, True, False, False, False, False, False], '\x07': [True, True, True, False, False, False, False, False], '\x08': [False, False, False, True, False, False, False, False], '\t': [True, False, False, True, False, False, False, False], ...} pot = [1, 2, 4, 8, 16, 32, 64, 128] x = 255 y = 128 |