Why?

NoName zaz600 at gmail.com
Mon Feb 5 20:14:30 EST 2007


thanx a lot!!


On 6 Фев., 12:04, "Gabriel Genellina" <gagsl... at yahoo.com.ar> wrote:
> En Mon, 05 Feb 2007 21:32:23 -0300, NoName <zaz... at gmail.com> escribio:
>
> > # -*- coding: cp1251 -*-
> > from glob import glob
>
> > src= "C:\\0000\\Новая папка\\*.*"
>
> print "src=",src
> print "repr(src)=",repr(src)> print glob(src)
>
> for fn in glob(src):
>    print fn
>
>
>
> > ['C:\\0000\\\xcd\xee\xe2\xe0\xff \xef\xe0\xef\xea\xe0\\ksdjfk.txt', 'C:
> > \\0000\\\xcd\xee\xe2\xe0\xff \xef
> > \xe0\xef\xea\xe0\\\xeb\xfb\xe2\xee\xe0\xeb\xee\xe0\xeb.txt']
>
> > Why not "C:\\0000\\Новая папка\\ksdjfk.txt" and etc?
>
> glob returns a list; when you print a list, it uses repr() on its  
> elements. It *looks* strange, but has the right contents. See the above  
> modifications.
>
> --
> Gabriel Genellina





More information about the Python-list mailing list