On Fri, 30 Jan 2009 21:59:34 +0100, Stef Mientki wrote:
> Marc 'BlackJack' Rintsch wrote:
>> On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
>>
>>
>>> try this:
>>>
>>> class MyRegClass ( int ) :
>>> def __init__ ( self, value ) :
>>> self.Value = value
>>> def __repr__ ( self ) :
Quoth Stef Mientki :
> Marc 'BlackJack' Rintsch wrote:
> > On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
> >
> >
> >> try this:
> >>
> >> class MyRegClass ( int ) :
> >> def __init__ ( self, value ) :
> >> self.Value = value
> >> def __repr__ ( self ) :
> >> line = hex ( se
Marc 'BlackJack' Rintsch wrote:
On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
try this:
class MyRegClass ( int ) :
def __init__ ( self, value ) :
self.Value = value
def __repr__ ( self ) :
line = hex ( self.Value )
line = line [:2] + line [2:].upper()
return li
On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
> try this:
>
> class MyRegClass ( int ) :
> def __init__ ( self, value ) :
> self.Value = value
> def __repr__ ( self ) :
> line = hex ( self.Value )
> line = line [:2] + line [2:].upper()
> return line
def __repr__
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
On Fri, Jan 30, 2009 at 9:02 AM, wrote:
> I'm trying to make a script environment with datatypes (or classes)
> for accessing hardware registers. At the top level, I would like the
> ability to bitwise ops if bit slice brackets are used, but if no
> brackets are used, I would like it to write/re
John Machin wrote:
On Jan 30, 9:02 am, mark.sea...@gmail.com wrote:
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I woul
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
mark.sea...@gmail.com wrote:
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit,
mark.sea...@gmail.com wrote:
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit,
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit, I
gotta then do another operati
On Jan 30, 9:55 am, Stef Mientki wrote:
> def __repr__ ( self ) :
> line = hex ( self.Value )
> line = line [:2] + line [2:].upper()
> return line
>
> btw, I'm a hardware guy too, and therefor I've never understood why the
> hex function returns lowercase ;-)
0xFF?? *Real* hardware
On Jan 30, 9:02 am, mark.sea...@gmail.com wrote:
> I'm trying to make a script environment with datatypes (or classes)
> for accessing hardware registers. At the top level, I would like the
> ability to bitwise ops if bit slice brackets are used, but if no
> brackets are used, I would like it to w
mark.sea...@gmail.com wrote:
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I would like it to write/read the whole value.
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I would like it to write/read the whole value.
For example, if I have someth
15 matches
Mail list logo