Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A working, tested Python conversion of the C++ parser for Endless Sky DataFiles

Project description

endless-sky-parse

A working, tested Python conversion of the C++ parser for Endless Sky DataFiles

How to install

$ pip install endless-sky-parse

How to use

from endless_sky.datafile import DataFile

f = DataFile("/usr/share/games/endless-sky/data/human/ships.txt")
it = f.root.filter(["ship", "Blackbird"])
ship = next(it)
ship.children[0]
# DataNode(tokens=['sprite', 'ship/blackbird'], children=[])
next(ship.filter_first("description")).tokens[1][:80]
# 'The Tarazed Blackbird is a high-class passenger transport, designed to move larg'

Development

$ python -m venv venv && . venv/bin/activate
$ pip install -r dev_requirements.txt

Run tests with

$ python setup.py test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for endless-sky-parse, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size endless_sky_parse-0.1.2-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size endless-sky-parse-0.1.2.tar.gz (7.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page