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 ) :
line = hex (
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
Quoth Stef Mientki stef.mien...@gmail.com:
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 (
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
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
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
On Jan 30, 9:55 am, Stef Mientki stef.mien...@gmail.com 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??
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
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,
On Jan 29, 3:13 pm, Stef Mientki stef.mien...@gmail.com 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
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
On Fri, Jan 30, 2009 at 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
On Jan 29, 3:13 pm, Stef Mientki stef.mien...@gmail.com 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
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__(self):
15 matches
Mail list logo