Re: Very dumb question

2005-10-12 Thread Laszlo Zsolt Nagy
>i. e. a character after a 'carriage return' ('\r') overwrites part of the >string which therefore doesn't seem to grow. Try > >print repr(data[:51]) > >to see what's really in your data string. > > Yes, that was it! Thanks for you help. I thought it will be something obvious. The server retu

Re: Very dumb question

2005-10-12 Thread Laszlo Zsolt Nagy
David Stockwell wrote: > Indeed,Are you writing a new book? > > http://www.amazon.com/exec/obidos/ASIN/1563052857/wildwierdmathpro I'm not, but thanks for asking. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Very dumb question

2005-10-12 Thread Laszlo Zsolt Nagy
> >I assume the code snippets are exact copy/paste so this is not a typo >(like print data[51:] ...) - and I can't reproduce it here... even with >a string of 20381 characters. > > Yes, they were cut out. type(data) returns ''. The data was downloaded from a website, it starts with http://www.w

RE: Very dumb question

2005-10-12 Thread David Stockwell
org >Subject: Very dumb question >Date: Wed, 12 Oct 2005 15:39:29 +0200 >I have a program with this code fragment: > > print len(data) > print data[:50] > raise SystemExit > >This prints: > >20381 > >But if I change 50 to 51 > > print len(d

Re: Very dumb question

2005-10-12 Thread Peter Otten
Laszlo Zsolt Nagy wrote: > I have a program with this code fragment: > > print len(data) > print data[:50] > raise SystemExit > > This prints: > > 20381 > > But if I change 50 to 51 > > print len(data) > print data[:51] > raise SystemExit > > then it prints > > 20381 > !DOCTYPE html PUBLIC

Re: Very dumb question

2005-10-12 Thread bruno modulix
Laszlo Zsolt Nagy wrote: > I have a program with this code fragment: > >print len(data) >print data[:50] >raise SystemExit > > This prints: > > 20381 > > But if I change 50 to 51 > >print len(data) >print data[:51] >raise SystemExit > > then it prints > > 20381 > !DO

Re: Very dumb question

2005-10-12 Thread Rocco Moretti
Laszlo Zsolt Nagy wrote: > Laszlo Zsolt Nagy wrote: > >> I have a program with this code fragment: >> >>print len(data) >>print data[:50] >>raise SystemExit >> >> This prints: >> >> 20381 >> > >> But if I change 50 to 51 >> >>print len(data) >>print data[:51] >>raise System

Re: Very dumb question

2005-10-12 Thread Laszlo Zsolt Nagy
Laszlo Zsolt Nagy wrote: >I have a program with this code fragment: > >print len(data) >print data[:50] >raise SystemExit > >This prints: > >20381 > >But if I change 50 to 51 > >print len(data) >print data[:51] >raise SystemExit > >then it prints > >20381 > !DOCTYPE html PU

Very dumb question

2005-10-12 Thread Laszlo Zsolt Nagy
I have a program with this code fragment: print len(data) print data[:50] raise SystemExit This prints: 20381 http://mail.python.org/mailman/listinfo/python-list