Re: [Tutor] Concatenating string

2011-02-23 Thread tee chwee liong
> The interesting questions are: > 1- are you SURE you were using 2.5 yesterday? > If so: > 2- did you import some modules? Which ones? > On my phone I have Python 2.5 too, and it gives the same errors to me. > > Is it possible that you upgrade to 2.6 or 2.7 ? > hi, yes i'm sure using Python

Re: [Tutor] Concatenating string

2011-02-23 Thread Joel Goldstick
On Tue, Feb 22, 2011 at 9:02 PM, tee chwee liong wrote: > hi Francesco, > > couldnt get hex of bin working on IDLE Python 2.5 when i type: > > >>> hex(0b1001001001001001001) > SyntaxError: invalid syntax > >>> bin(0x49249) > > Traceback (most recent call last): > File "", line 1, in > bin

Re: [Tutor] Concatenating string

2011-02-23 Thread Francesco Loffredo
On 23/02/2011 3.02, tee chwee liong wrote: hi Francesco, couldnt get hex of bin working on IDLE Python 2.5 when i type: >>> hex(0b1001001001001001001) SyntaxError: invalid syntax >>> bin(0x49249) Traceback (most recent call last): File "", line 1, in bin(0x49249) NameError: name 'bin' is not

Re: [Tutor] Concatenating string

2011-02-22 Thread Dave Angel
On 01/-10/-28163 02:59 PM, tee chwee liong wrote: hi Francesco, couldnt get hex of bin working on IDLE Python 2.5 when i type: hex(0b1001001001001001001) SyntaxError: invalid syntax bin(0x49249) Traceback (most recent call last): File "", line 1, in bin(0x49249) NameError: name 'bi

Re: [Tutor] Concatenating string

2011-02-22 Thread tee chwee liong
hi Francesco, couldnt get hex of bin working on IDLE Python 2.5 when i type: >>> hex(0b1001001001001001001) SyntaxError: invalid syntax >>> bin(0x49249) Traceback (most recent call last): File "", line 1, in bin(0x49249) NameError: name 'bin' is not defined pls advise. thanks tcl

Re: [Tutor] Concatenating string

2011-02-22 Thread tee chwee liong
hi, i dont know why when i re-run bin(0xff0) today at IDLE Python 2.5, it gives me traceback error. >>> bin(0xff0) Traceback (most recent call last): File "", line 1, in bin(0xff0) NameError: name 'bin' is not defined i guess Python 2.5 doesn't support binary conversion of hex. con

Re: [Tutor] Concatenating string

2011-02-22 Thread Francesco Loffredo
On 22/02/2011 14.46, tee chwee liong wrote: hi, >>> bin(0xff0) '' >>> bin(0xff1) '0001' >>> a=bin(0xff0)+bin(0xff1) >>> a '0001' >>> b=0xff0 >>> c=0xff1 >>> d=b+c >>> d 8161 >>> bin(d) '1' question: 1) why is it that a and d values ar

Re: [Tutor] Concatenating string

2011-02-22 Thread bob gailer
On 2/22/2011 8:46 AM, tee chwee liong wrote: hi, >>> bin(0xff0) '' >>> bin(0xff1) '0001' >>> a=bin(0xff0)+bin(0xff1) >>> a '0001' >>> b=0xff0 >>> c=0xff1 >>> d=b+c >>> d 8161 >>> bin(d) '1' question: 1) why is it that a and d values are differ

Re: [Tutor] Concatenating string

2011-02-22 Thread Adam Bark
On 22/02/11 13:46, tee chwee liong wrote: hi, >>> bin(0xff0) '' >>> bin(0xff1) '0001' >>> a=bin(0xff0)+bin(0xff1) >>> a '0001' >>> b=0xff0 >>> c=0xff1 >>> d=b+c >>> d 8161 >>> bin(d) '1' question: 1) why is it that a and d values are different

[Tutor] Concatenating string

2011-02-22 Thread tee chwee liong
hi, >>> bin(0xff0) '' >>> bin(0xff1) '0001' >>> a=bin(0xff0)+bin(0xff1) >>> a '0001' >>> b=0xff0 >>> c=0xff1 >>> d=b+c >>> d 8161 >>> bin(d) '1' question: 1) why is it that a and d values are different? i'm using Python 2.5. 2) how to conv