Skip to content

Commit

Permalink
Add inr2() api in r2pipe-python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 28, 2024
1 parent b998565 commit 5787b9a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/r2pipe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@

VERSION = "1.8.8"

def inr2():
"""Return wheter r2pipe is called from radare2 environment or the system shell
"""
a = int(os.environ["R2PIPE_IN"]),
b = int(os.environ["R2PIPE_OUT"]),
return a > 0 and b > 0

def version():
"""Return string with the version of the r2pipe library
Expand Down

0 comments on commit 5787b9a

Please sign in to comment.