2009/11/12 hong zhang <henryzhan...@yahoo.com>: > 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. >
Sorry cannot try it myself to confirm. Could it be that $POWER is not set. Does it write to a regular file. Thank You, ++imanshu -- http://mail.python.org/mailman/listinfo/python-list