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
>>
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
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
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