artiq_rpctool: document numpy availability in RPC call cmd line arguments

This commit is contained in:
Yann Sionneau 2015-04-20 12:49:13 +02:00 committed by Sebastien Bourdeauducq
parent 301a0e6447
commit e19f8896f0
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
import argparse import argparse
import textwrap import textwrap
import sys import sys
import numpy as np import numpy as np # Needed to use numpy in RPC call arguments on cmd line
from artiq.protocols.pc_rpc import Client from artiq.protocols.pc_rpc import Client

View File

@ -61,10 +61,11 @@ in order to call remote functions of an ARTIQ controller.
$ artiq_rpctool.py hostname port call -t target f x1 x2 ... xN $ artiq_rpctool.py hostname port call -t target f x1 x2 ... xN
You can use Python syntax to compute arguments as they will be passed You can use Python syntax to compute arguments as they will be passed
to the ``eval()`` primitive. But beware to use quotes to separate to the ``eval()`` primitive. The numpy package is available in the namespace
arguments which use spaces:: as ``np``. Beware to use quotes to separate arguments which use spaces::
$ artiq_rpctool.py hostname port call -t target f '3 * 4 + 2' True '[1, 2]' $ artiq_rpctool.py hostname port call -t target f '3 * 4 + 2' True '[1, 2]'
$ artiq_rpctool.py ::1 3256 call load_sample_values 'np.array([1.0, 2.0], dtype=float)'
If the called function has a return value, it will get printed to If the called function has a return value, it will get printed to
the standard output if the value is not None like in the standard the standard output if the value is not None like in the standard