Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread Jess
Cheap Chanel Watches for sale at: http://www.luxuryowner.net/ Chanel Watches collection: http://www.luxuryowner.net/replica-chanel-watches.html Chanel J12 Automatic Watches: http://www.luxuryowner.net/Chanel-J12-Automatic-Watches.html Chanel J12 Quartz Watches: http://www.luxuryowner.net/Chan

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread Mensanator
On May 12, 1:40 pm, MRAB wrote: > robert somerville wrote: > > I am trying to determine how to test whether variors bits are set within > > a byte (or larger flag) , the python 'and' and 'or' do not seem to be > > doing what i want .. does anybody have some sample code showing how to > > do it ??

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread cjw
On 12-May-10 14:40 PM, MRAB wrote: robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in "C"

Re: How to test whether bit is set within a flag with Python ?

2010-05-12 Thread MRAB
robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in "C") unsigned char a = 6; is 3rd b

How to test whether bit is set within a flag with Python ?

2010-05-12 Thread robert somerville
I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in "C") unsigned char a = 6; is 3rd bit set ?? a & 4 =, true in t