WerWolv / WerWolv/PatternLanguage

Suggestion: Python bindings

Open
#157 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
275
Forks
75
Avg merge
1d 22h
Merged PRs (30d)
10

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing PatternLanguage CLI and its mentioned format subcommand, using tests/data/test_data and tests/data/test.hexpat as the example inputs. Determine the binding boundary and whether the proposed format API can return a dictionary; done means a documented decision and scoped plan for official or separate Python bindings.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.