python-rpc: add console.py

It allows one to connect to a running daemon or wallet, and use
its RPC API from python.

Usage: python -i console.py <port>

It will detect whether it's talking to a daemon or wallet and
initialize itself accordingly.
This commit is contained in:
moneromooo-monero 2019-03-22 15:25:33 +00:00
parent 22b644f47e
commit c7bfdc3566
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 66 additions and 1 deletions

View file

@ -60,7 +60,7 @@ try:
PYTHONPATH = os.environ['PYTHONPATH'] if 'PYTHONPATH' in os.environ else ''
if len(PYTHONPATH) > 0:
PYTHONPATH += ':'
PYTHONPATH += '../../utils/python-rpc'
PYTHONPATH += srcdir + '/../../utils/python-rpc'
os.environ['PYTHONPATH'] = PYTHONPATH
for i in range(len(command_lines)):
#print('Running: ' + str(command_lines[i]))