Re: [Fwd: Re: hex string to hex value]

2005-11-22 Thread tim
Brett g Porter wrote: > tim wrote: > >> >> I end up with 66 again, back where I started, a decimal, right? >> I want to end up with 0x42 as being a hex value, not a string, so i >> can pas it as an argument to a function that needs a hex value. >> (i am trying to replace the 0x42 in the line >>

Re: [Fwd: Re: hex string to hex value]

2005-11-22 Thread Brett g Porter
tim wrote: > > I end up with 66 again, back where I started, a decimal, right? > I want to end up with 0x42 as being a hex value, not a string, so i can > pas it as an argument to a function that needs a hex value. > (i am trying to replace the 0x42 in the line midi.note_off(channel=0, > note=0

Re: [Fwd: Re: hex string to hex value]

2005-11-22 Thread Rocco Moretti
tim wrote: > ok, but if i do > > >>> n=66 > >>> m=hex(n) > >>> m > '0x42' > >>> h=int(m,16) > >>> h > 66 > >>> > > I end up with 66 again, back where I started, a decimal, right? > I want to end up with 0x42 as being a hex value, not a string, so i can > pas it as an argument to a function

[Fwd: Re: hex string to hex value]

2005-11-22 Thread tim
ok, but if i do >>> n=66 >>> m=hex(n) >>> m '0x42' >>> h=int(m,16) >>> h 66 >>> I end up with 66 again, back where I started, a decimal, right? I want to end up with 0x42 as being a hex value, not a string, so i can pas it as an argument to a function that needs a hex value. (i am trying t