Re: menu and file

2009-12-26 Thread hong zhang
> > List, > > > > I want to read a file that has a list of data into a > menu. User can pick > > up a line of data and execute it. For example, file > has data like > > following > > > > 1   23   0x4530 > > 2   42   0x8790 > > 3   75   0x7684 > > . > > > > User can select line # and then exe

menu and file

2009-12-25 Thread hong zhang
List, I want to read a file that has a list of data into a menu. User can pick up a line of data and execute it. For example, file has data like following 1 23 0x4530 2 42 0x8790 3 75 0x7684 . User can select line # and then execute hex data in that line. Any sample codes will b

IndentationError

2009-12-10 Thread hong zhang
List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError: unindent does not match any oute

switch

2009-12-08 Thread hong zhang
List, Python does not have switch statement. Any other option does similar work? Thanks for help. --henry -- http://mail.python.org/mailman/listinfo/python-list

hex

2009-11-18 Thread hong zhang
List, I want to input hex number instead of int number. in type="int" in following, parser.add_option("-F", "--forcemcs", dest="force_mcs", type="int", default=0, help="index of 11n mcs table. Default: 0.") How can I do it? Thanks. --henry -- http://mail.python.org/mailman/listinfo/p

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards wrote: > From: Grant Edwards > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Wednesday, November 18, 2009, 2:00 PM > On 2009-11-18, Diez B. Roggisch > > wrote: > > hong zhan

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Diez B. Roggisch wrote: > From: Diez B. Roggisch > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Wednesday, November 18, 2009, 12:11 PM > hong zhang wrote: > > > > > > > --- On W

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards wrote: > From: Grant Edwards > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Wednesday, November 18, 2009, 9:22 AM > On 2009-11-18, hong zhang > wrote: > > >> Apparently the

Re: IOError: [Errno 28] No space left on device

2009-11-18 Thread hong zhang
--- On Wed, 11/18/09, Grant Edwards wrote: > From: Grant Edwards > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Wednesday, November 18, 2009, 9:22 AM > On 2009-11-18, hong zhang > wrote: > > >> Apparently the

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
--- On Tue, 11/17/09, Tim Chase wrote: > From: Tim Chase > Subject: Re: IOError: [Errno 28] No space left on device > To: "Lie Ryan" > Cc: python-list@python.org > Date: Tuesday, November 17, 2009, 7:47 PM > >> for i in > glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx')

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
--- On Tue, 11/17/09, Lie Ryan wrote: > From: Lie Ryan > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Tuesday, November 17, 2009, 6:59 PM > hong zhang wrote: > > List, > > > > My python script has a strange er

IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
List, My python script has a strange error. cont_tx = 1 for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'): with open(i, 'w') as f: print >>f, cont_tx work perfectly. But following get error like: print >>f, cont_tx IOError: [Errno 28] No s

Re: directory wildcard

2009-11-16 Thread hong zhang
--- On Mon, 11/16/09, Jeff McNeil wrote: > From: Jeff McNeil > Subject: Re: directory wildcard > To: python-list@python.org > Date: Monday, November 16, 2009, 3:01 PM > On Nov 16, 3:33 pm, hong zhang > > wrote: > > List, > > > > I try to assign val

directory wildcard

2009-11-16 Thread hong zhang
List, I try to assign value to force_mcs sitting in a wildcard subdirectory /sys/kernel/debug/ieee80211/phy*, but python does not work for that such as: os.system("echo %i > /sys/kernel/debug/ieee80211/phy*/iwlagn/data/force_mcs" % mcs) Any right way to do it? Thanks. --henry --

python with echo

2009-11-11 Thread hong zhang
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