Chris Grau wrote:
> On Sat, Aug 30, 2008 at 04:56:24PM -0700, James G. Sack (jim) wrote:
>>>>> "\X41"
>> 'A'
> 
> What version of Python are you using?  Is there an interpreter flag I'm
> missing?
> 
> Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) 
> [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> "\X41"
> '\\X41'

python -V
Python 2.5

rpm -q python
python-2.5-15.fc7

Well, I was using ipython for the shell

ipython
Python 2.5 (r25:51908, Nov  6 2007, 15:55:44)

but w/ regular python

Python 2.5 (r25:51908, Nov  6 2007, 15:55:44)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2

Ahhh, in a regular python shell I do NOT get the same result
>>> "\X41"
'\\X41'

now I'm more confused.
Oh wait, regular python seems to want lower case "\x"

>>> "\x41"
'A'

(it's hard to quote the python prompt in email eh?)


..thus the same problem stands, functionally composing a string (eg, by
adding y+z) produces an escape-form I can't seem to eval.

I'm really thinking there's something wrong with Python, but thought it
might be politic to first check whether there wasn't something wrong
with me. :-)

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to