Re: Jython



Boris Ozegovic wrote:

gregturn@xxxxxxxxxxxxxx wrote:

Files aren't lists and thus don't have the functions for iteration.

They do have iterator:

C:\Documents and Settings\Silovana Vjeverica\Desktop>python FileReader.py
'import site' failed; use -v for traceback
boris ozegovic
vedran ozegovic

But apparently not in Jython... Only Python.

Tnx, anyway

--
"A mi smo stranci u vlastitoj zemlji zbog ljudskog sljama, lipa nasa
silovana"
.



Relevant Pages

  • Re: ListMixin (WAS: How do you control _all_ items added to a list?)
    ... iterator if it is provided: ... Traceback: ... TypeError: unsized object ...
    (comp.lang.python)
  • Re: Jython
    ... They do have iterator: ... 'import site' failed; use -v for traceback ... "A mi smo stranci u vlastitoj zemlji zbog ljudskog sljama, ...
    (comp.lang.python)
  • Re: an enumerate question
    ... Depends what you want to happen when you request "next". ... Traceback: ... If you want to peek ahead without removing the line from the iterator, ... (Note that the recipe doesn't try to catch the StopIteration, ...
    (comp.lang.python)
  • Re: an enumerate question
    ... renumber the lines, you can call .nexton the iterator:: ... Traceback: ... If you want to peek ahead without removing the line from the iterator, check out this recipe:: ...
    (comp.lang.python)