From 7fb06a847c98900d8623f0c96cb27a6ba5f436c5 Mon Sep 17 00:00:00 2001 From: Andrew Haberlandt Date: Tue, 7 May 2024 04:44:17 +0000 Subject: [PATCH] docs: document how scripts can take arguments --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b88428d..aadf731 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,17 @@ Type "help", "copyright", "credits" or "license" for more information. >>> ``` +**Can my scripts parse arguments?** + +Yes. Script arguments can be passed before +the `--` when running `pyda`. For example: +```sh +pyda script.py --option1 --optinon2 -- ls +``` + +Your script can parse these options like normal +with the `argparse` module. + ## How it works Pyda runs as a [Dynamorio](https://dynamorio.org) tool: `pyda` is just a `drrun` wrapper. We include compatibility patches for both Dynamorio and CPython. Dynamorio handles all the nasty details: inserting instrumentation, machine state trasitions to/from hooks, etc.