Skip to content

Commit

Permalink
Hide r2pipe.py imports from the outside
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 28, 2024
1 parent 5787b9a commit 414ea9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/r2pipe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@
> r.quit()
"""

import os
import sys
import time
from r2pipe.open_sync import open as r2pipe_open

open = r2pipe_open
from r2pipe.open_sync import open

try:
import r2lang
Expand All @@ -41,6 +36,7 @@
def inr2():
"""Return wheter r2pipe is called from radare2 environment or the system shell
"""
import os
a = int(os.environ["R2PIPE_IN"]),
b = int(os.environ["R2PIPE_OUT"]),
return a > 0 and b > 0
Expand All @@ -53,10 +49,14 @@ def version():

# Open class is now in open_base.py
if __name__ == "__main__":
import os
import sys
from r2pipe.open_sync import open as r2pipe_open
print("[+] Spawning r2 tcp and http servers")
os.system("pkill r2")
os.system("radare2 -qc.:9080 /bin/ls &")
os.system("radare2 -qc=h /bin/ls &")
import time
time.sleep(1)

if sys.version_info <= (3, 0):
Expand Down

0 comments on commit 414ea9f

Please # to comment.