I want to get the eighth line in the text of the text in the clipboad, but when I call GetClipboardData
I only get a string, how can I repair it?
[snip]

Split the string into lines and take the eighth line (at index 7). I've
limited the number of splits to 8 because I'm not interested in any of
the following lines:

     line = text.split("\r\n", 8)[7]

Strings have a .splitlines() method that makes this a little more elegant:

  line = text.splitlines()[7]

-tkc




--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to