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.0.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.0.0.tar.gz.
File metadata
- Download URL: py_visual_cobol-1.0.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 |
5cb4f0f7a080aac46c495c601a226e4eaf3380f101ee60bb0d738eb70a0ad619
|
|
| MD5 |
102990fef82082dc63aa344cd6b705a9
|
|
| BLAKE2b-256 |
610fbc07263a437f5a6ccb866d86931e51337155d83fc728844c26dc42751b32
|
File details
Details for the file py_visual_cobol-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py_visual_cobol-1.0.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 |
8cbff320e3b697039d8d65af4043f0f4f5d6c66d8ff942eed2efd38585863c19
|
|
| MD5 |
cb00983fb36b3d14a1718068b5d91506
|
|
| BLAKE2b-256 |
47d29c7b37e0f477e7ecc101195b53f71a16edba7d8ab01c1f1753f9b20966b9
|