entry widget and rotor module

richard_chamberlain richard_chamberlain at ntlworld.com
Thu Jun 29 02:11:21 EDT 2000


Hi Keith,

If you ignore the fact your using the rotor module and just print your
string you get the following:

>>> print '.\314q\217'
.Ìq

If you do this:

>>> print r'.\314q\217'
.\314q\217

So it's nothing to do with rotor but just escape characters in the string
i.e. \ being converted.

Richard




<kpmurphy at my-deja.com> wrote in message news:8jdff7$mc0$1 at nnrp1.deja.com...
> can anyone help out... what's going on below?
>
> anna% python
> Python 1.5.2 (#12, Jun 26 2000, 13:56:56)  [GCC 2.95.2 19991024
> (release)] on sunos5
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import rotor
> >>> rt = rotor.newrotor('qwerty', 20)
> >>> rt.encrypt('boat')
> '.\314q\217'
> >>> foo = rt.encrypt('boat')
> >>> type(foo)
> <type 'string'>
> >>> foo
> '.\314q\217'
> >>> print foo
> .Ìq
> >>>
>
> ...it appears that the string foo has the right data in it, but prints
> out weird characters.  Thanks,
>
> keith
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list