a python library that reads and writes Spirent iTest ParameterTree (.ffpt) files
Project description
ffptutils-py
A python library that reads/writes Spirent iTest Parameter (.ffpt) files.
Tested with Python 3.6, 3.7, and 3.8 on Windows and Ubuntu platforms.
Features
- Convert .ffpt file <-> .csv file.
- Supported CSV encoding is utf-8 with BOM (Suitable for Windows Excel).
- Supported Parameter Types are: TEXT, BOOLEAN, INTEGER and DOUBLE.
- Load .ffpt file from your python script.
Install
pip install ffptutils
Usage 1) Convert .ffpt <-> .csv
- Convert a ffpt file to csv format.
> ffpt2csv file1_orig.ffpt edit.csv
-
Edit the csv file using Excel or other software.
-
Convert the csv file back to ffpt format.
> csv2ffpt edit.csv file1.ffpt
Usage 2) General purpose .ffpt file loader
import ffptutils
pt = ffptutils.load('test/2.ffpt')
assert pt['param1'] == 'some value'
assert pt['param2'] == True
assert pt['param3'] == False
assert pt['param4'] == None
assert pt['param5'] == 24
assert pt['param6'] == 1.0
assert pt['param7/param1'] == 'hoge'
assert pt['param7/param2/param1'] == 'fuga'
As you can see, it recognizes the Parameter types and converts into the appropriate python types as below:
- TEXT -> str
- DOUBLE -> float
- INTEGER -> int
- BOOLEAN -> bool
TODO: Planned features
- pip packaging
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
ffptutils-0.1.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for ffptutils-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78901d97df86af11526c4e092a7aec3a4604d48fefe4c0439dd51f2ba15890f9 |
|
MD5 | 9a34654cfa8c043d6f2c39fb8fbeb638 |
|
BLAKE2b-256 | 13278f0438864efc69f3a84cfa6ac103594fad892ac709a478f52ddc6109c8f2 |