Thread View: pl.comp.lang.python
6 messages
6 total messages
Started by "Artur M. Piwko"
Thu, 21 Aug 2003 00:12
python + zip - alternatywa?
Author: "Artur M. Piwko"
Date: Thu, 21 Aug 2003 00:12
Date: Thu, 21 Aug 2003 00:12
23 lines
810 bytes
810 bytes
Czy istnieje jaka� alternatywa dla modu�u zipfile? Nie obs�uguje plik�w ze spacjami (dla mnie to b. istotne). Dostaj� co� takiego: Traceback (most recent call last): File "./roman.py", line 18, in ? info = zip.getinfo( zip ) File "/usr/lib/python2.2/zipfile.py", line 316, in getinfo return self.NameToInfo[name] KeyError: <zipfile.ZipFile instance at 0x8120694> Czyli wida�, �e nazwa jest u�ywana jako indeks tablicy (st�d b��d przy spacjach w�a�nie). Artur -- Before the Goat of Mendes... we all must take our turn | Artur M. Piwko Into the magic circle... where still the fire burns | mailto:s/_/./ We're spinning round and round... until one takes a fall | -- Mercyful Fate The fallen one will not return, the fallen one must burn | "Witches' Dance"
Re: python + zip - alternatywa?
Author: bromden
Date: Thu, 21 Aug 2003 10:52
Date: Thu, 21 Aug 2003 10:52
11 lines
273 bytes
273 bytes
> Czyli wida�, �e nazwa jest u�ywana jako indeks tablicy (st�d b��d > przy spacjach w�a�nie). a moglbys pokazac kawalek kodu? to nie indeks tablicy, tylko klucz slownika i to, ze klucze zawieraja spacje, raczej nie ma znaczenia -- bromden[at]gazeta.pl
Re: python + zip - alternatywa?
Author: Grzegorz Makarew
Date: Thu, 21 Aug 2003 10:53
Date: Thu, 21 Aug 2003 10:53
24 lines
731 bytes
731 bytes
Artur M. Piwko wrote: > Czy istnieje jaka¶ alternatywa dla modu³u zipfile? > Nie obs³uguje plików ze spacjami (dla mnie to b. istotne). > Dostajê co¶ takiego: > > Traceback (most recent call last): > File "./roman.py", line 18, in ? > info = zip.getinfo( zip ) > File "/usr/lib/python2.2/zipfile.py", line 316, in getinfo > return self.NameToInfo[name] > KeyError: <zipfile.ZipFile instance at 0x8120694> > > Czyli widaæ, ¿e nazwa jest u¿ywana jako indeks tablicy (st±d b³±d > przy spacjach w³a¶nie). Raczej brak poszukiwanej nazwy pliku w tym zipie, ZipFile nie ingeruje w nazwy plikow - mozesz dodac nawet takie, ktore maja \0 lub nazwy w unikodzie (python 2.3.1). mak
Re: python + zip - alternatywa?
Author: "Artur M. Piwko"
Date: Thu, 21 Aug 2003 12:27
Date: Thu, 21 Aug 2003 12:27
21 lines
829 bytes
829 bytes
In the darkest hour on Thu, 21 Aug 2003 10:52:14 +0200, bromden <bromden@gazeta.pl.no.spam> screamed: >> Czyli wida�, �e nazwa jest u�ywana jako indeks tablicy (st�d b��d >> przy spacjach w�a�nie). > > a moglbys pokazac kawalek kodu? > to nie indeks tablicy, tylko klucz slownika i to, > ze klucze zawieraja spacje, raczej nie ma znaczenia > To co przedstawi�em to rezultat wywo�ania metody read z nazw� pliku jako argumentem, co ciekawsze wszystko chodzi �adnie po zamianie spacji na _. Artur -- Before the Goat of Mendes... we all must take our turn | Artur M. Piwko Into the magic circle... where still the fire burns | mailto:s/_/./ We're spinning round and round... until one takes a fall | -- Mercyful Fate The fallen one will not return, the fallen one must burn | "Witches' Dance"
Re: python + zip - alternatywa?
Author: "Artur M. Piwko"
Date: Thu, 21 Aug 2003 13:02
Date: Thu, 21 Aug 2003 13:02
19 lines
685 bytes
685 bytes
In the darkest hour on Thu, 21 Aug 2003 14:50:04 +0200, piter <tojopiter@yahoo.com> screamed: > a czemu do metody getinfo przekazujesz obiekt na rzecz ktorego odpalasz > getinfo. > imho cos Ci sie z parametrami pomylilo... > tam ma byc string... > Uhm. Racja. Sprawdz� w domu czy to dlatego... Widocznie, rezultat jakiego� testu zosta� w tym przyk�adzie... \-: Artur -- Before the Goat of Mendes... we all must take our turn | Artur M. Piwko Into the magic circle... where still the fire burns | mailto:s/_/./ We're spinning round and round... until one takes a fall | -- Mercyful Fate The fallen one will not return, the fallen one must burn | "Witches' Dance"
Re: python + zip - alternatywa?
Author: "piter"
Date: Thu, 21 Aug 2003 14:50
Date: Thu, 21 Aug 2003 14:50
36 lines
1127 bytes
1127 bytes
U�ytkownik "Artur M. Piwko" <pipen@beast_tu_kielce.pl> napisa� w wiadomo�ci news:slrnbk83r0.l9t.pipen@beast.tu.kielce.pl... > Czy istnieje jaka� alternatywa dla modu�u zipfile? > Nie obs�uguje plik�w ze spacjami (dla mnie to b. istotne). > Dostaj� co� takiego: > > Traceback (most recent call last): > File "./roman.py", line 18, in ? > info = zip.getinfo( zip ) a czemu do metody getinfo przekazujesz obiekt na rzecz ktorego odpalasz getinfo. imho cos Ci sie z parametrami pomylilo... tam ma byc string... > File "/usr/lib/python2.2/zipfile.py", line 316, in getinfo > return self.NameToInfo[name] > KeyError: <zipfile.ZipFile instance at 0x8120694> > > Czyli wida�, �e nazwa jest u�ywana jako indeks tablicy (st�d b��d > przy spacjach w�a�nie). > > > Artur > > -- > Before the Goat of Mendes... we all must take our turn | Artur M. Piwko > Into the magic circle... where still the fire burns | mailto:s/_/./ > We're spinning round and round... until one takes a fall | -- Mercyful Fate > The fallen one will not return, the fallen one must burn | "Witches' Dance"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads