Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

read Zwick zs2 and zp2 files

Project Description

zs2decode is a Python (2.7, 3.3, 3.4, 3.5) implementation of a decoder for Zwick zs2 files.

zs2 files contain measurements and meta data. zs2decode is able to convert these files to XML for further processing. The following script converts a zs2 file into XML:

import io
import zs2decode.parser
import zs2decode.util

zs2_file_name = 'my_data_file.zs2'
xml_output_file = 'my_data_file.xml'

# load and decompress file
data_stream = zs2decode.parser.load(zs2_file_name)
# separate binary data stream into chunks
raw_chunks = zs2decode.parser.data_stream_to_chunks(data_stream)
# convert binary chunk data into lists of Python objects
chunks = zs2decode.parser.parse_chunks(raw_chunks)
# output as text file
with io.open(xml_dump_file, 'wt', encoding='utf-8') as f:
    f.write( zs2decode.util.chunks_to_XML(chunks) )

Documentation is available at http://zs2decode.readthedocs.org/ and source code at https://github.com/cpetrich/zs2decode.git.

Release History

Release History

This version
History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zs2decode-0.1-py2.py3-none-any.whl (13.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 7, 2015
zs2decode-0.1.zip (39.4 kB) Copy SHA256 Checksum SHA256 Source Dec 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting