Skip to content

Suggestion: Python bindings #157

@manazoid

Description

@manazoid

Hey, @WerWolv Nik!

Your Pattern Language is great. I like to use within ImHex software. But now I have a use case that doesn't covered at all.

A desktop application that read binary files and integrates with already existing source code based on Python language. I would like to see pypl (python pattern language) instead of PatternLanguage CLI.

The use case is that:

from pypl import PatternLanguage

with open("tests/data/test_data", "rb") as f:
    data = f.read()
with open("tests/data/test.hexpat", "rb") as f:
    patt = f.read()

pl = PatternLanguage()
output = pl.format(data, patt)
print(output) # that output is dict

What you think about that? Can it be official release in the same repo or separate repository of python bindings (at least format subcommand)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions