No project description provided
Project description
py-visual-cobol
│
├───py_visual_cobol
│ ├───record_extractor.py
│ ├───__init__.py
│ │
│ ├───constants
│ │ ├───params.py
│ │ └───__init__.py
│ │
│ └───utils
│ ├───bytes_converter.py
│ ├───segment_patterns_generator.py
│ └─── __init__.py
├───tests
│ │ test_bytes_converter.py
│ │ test_segment_patterns_generator.py
│ └───__init__.py
│
├───poetry.lock
├───pyproject.toml
└───README.md
import argparse
from py_visual_cobol.record_extractor import record_header_extractor
def parse_args():
"""Parse command line arguments."""
parser = argparse.ArgumentParser(description="Process a microfile.")
parser.add_argument("file_path", type=str, help="Path to the microfile.")
return parser.parse_args()
if __name__ == "__main__":
# Parse command-line arguments
args = parse_args()
with open("data/file.bin",mode='rb') as file:
content = file.read()
# Read the file content
records_length = [
126,
836,
96,
694,
302,
160,
107,
76,
266,
68,
99,
78,
425,
]
# Extract records using the segment patterns generated
records = record_header_extractor(content,records_length=records_length)
# Print the extracted records
print(records[0])
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
py_visual_cobol-1.1.0.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_visual_cobol-1.1.0.tar.gz.
File metadata
- Download URL: py_visual_cobol-1.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d74c7ae03b5d580b01cf6fdcff9cfbbad12d75a4abd9d3e172a83154adfd174c
|
|
| MD5 |
05bd4d2d4c20f00b425716d567eb8dd4
|
|
| BLAKE2b-256 |
615584b896a2007cd29dd0e6034099e37cb19d707eaeca94dedd7787cc8e2525
|
File details
Details for the file py_visual_cobol-1.1.0-py3-none-any.whl.
File metadata
- Download URL: py_visual_cobol-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2175635e1cf4f6a2ea72241acdfc34345f448753ac04f30b861ee1ad4bf74207
|
|
| MD5 |
7af865bab248ca5b7112768eb2811bd9
|
|
| BLAKE2b-256 |
67e1ea1b337ff1b195ae52e2e281c08b70b940274d166f9543504cbce75a6ad1
|