forked from M-Labs/artiq
rpctool: make readline optional, add to conda dependencies. Closes #442
This commit is contained in:
parent
aa26b13816
commit
8d0034e11d
|
@ -5,7 +5,6 @@ import textwrap
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import numpy as np # Needed to use numpy in RPC call arguments on cmd line
|
import numpy as np # Needed to use numpy in RPC call arguments on cmd line
|
||||||
import readline # This makes input() nicer
|
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
from artiq.protocols.pc_rpc import AutoTarget, Client, RemoteError
|
from artiq.protocols.pc_rpc import AutoTarget, Client, RemoteError
|
||||||
|
@ -87,6 +86,12 @@ def call_method(remote, method_name, args):
|
||||||
|
|
||||||
|
|
||||||
def interactive(remote):
|
def interactive(remote):
|
||||||
|
try:
|
||||||
|
import readline # This makes input() nicer
|
||||||
|
except ImportError:
|
||||||
|
print("Warning: readline not available. "
|
||||||
|
"Install it to add line editing capabilities.")
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
cmd = input("({}) ".format(remote.get_selected_target()))
|
cmd = input("({}) ".format(remote.get_selected_target()))
|
||||||
|
|
|
@ -37,6 +37,8 @@ requirements:
|
||||||
- binutils-or1k-linux
|
- binutils-or1k-linux
|
||||||
run:
|
run:
|
||||||
- python >=3.5.1
|
- python >=3.5.1
|
||||||
|
- readline # [linux]
|
||||||
|
- pyreadline # [win]
|
||||||
- llvmlite-artiq 0.10.0.dev py35_24
|
- llvmlite-artiq 0.10.0.dev py35_24
|
||||||
- scipy
|
- scipy
|
||||||
- numpy
|
- numpy
|
||||||
|
|
Loading…
Reference in New Issue