Hi tutors,<br><br>aboard again after a long time.<br>http://..._export.php?mehet=1 is a link which exports me some data in CSV correctly when I click on it in my browser. (It contains personal data, that's why I dotted.) I want to process it directly from Python, excluding the browser phase.<br>
<br>The following piece of code in Python 3.3 prints the first n-1 lines nicely, then the beginning of the last line truncated. I mean there are 12 fields in CSV and in the last line only 1.5 fields of them are displayed. I suspect some closing/caching error. <br>
In the first times it worked well but after a certain time it spoiled without PHP code being modified. I guess it may somehow be connected to quantity of lines.<br>How could I read the last line?<br>Thx, Péter<br><br><span style="font-family:courier new,monospace">from urllib.request import urlopen<br>
x=urlopen('http://..._export.php?mehet=1')<br>y=x.read().decode('windows-1250')<br>print(y)</span><br><br>Output looks like this:<br><span style="font-family:courier new,monospace">159;Name of <a href="mailto:customer159%3Bxxxx@gmail.com">customer159;xxxx@gmail.com</a>;phone;22;0;0;0;1;0;0;2013-02-09 20:20:26<br>
160;Name of <a href="mailto:customer160%3Byyyy@gmail.com">customer160;yyyy@gmail.com</a>;phone;14;0;0;1;0;0;0;2013-02-09 20:38:16<br>161;Name of c</span><br>