python with echo
hong zhang
henryzhang62 at yahoo.com
Wed Nov 11 20:24:37 EST 2009
List,
I have a question of python using echo.
POWER = 14
return_value = os.system('echo 14 > /sys/class/net/wlan1/device/tx_power')
can assign 14 to tx_power
But
return_value = os.system('echo $POWER > /sys/class/net/wlan1/device/tx_power')
return_value is 256 not 0. It cannot assign 14 to tx_power.
What problem is it?
os.system("echo $POWER") returns 0 but
os.system("echo $POWER > /sys/class/net/wlan1/device/tx_power") returns 256.
Appreciate any help!
Thanks.
---henry
More information about the Python-list
mailing list