Skip to content

Commit

Permalink
docs: document how scripts can take arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrewh committed May 7, 2024
1 parent f76af35 commit 7fb06a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7fb06a8

Please sign in to comment.