read Zwick zs2 and zp2 files
Project description
zs2decode is a Python (2.7, 3.3, 3.4, 3.5, 3.6) 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.
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
zs2decode-0.2.0.tar.gz
(34.1 kB
view hashes)
Built Distribution
Close
Hashes for zs2decode-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13c5a178c1aeeb77dc0068a80d4129f0e7ed20b95402de81f7913e624be29b1c |
|
MD5 | 96a4618f7ad1d02b7cf09bff54ae5b10 |
|
BLAKE2b-256 | ff9df359e691f8dd209c673950a4877692317c713e676da95af96ae01ceab9f6 |