[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Sat Jan 8 14:46:37 2005 -->
- <!--x-from-r13: wybqra ng gbhtuthl.arg (Xnl Zbqra) -->
- <!--x-message-id: [email protected] -->
- <!--x-subject: [ale] Python - read in text minus "\n" -->
- <li><em>date</em>: Sat Jan 8 14:46:37 2005</li>
- <li><em>from</em>: jloden at toughguy.net (Jay Loden)</li>
- <li><em>subject</em>: [ale] Python - read in text minus "\n"</li>
I am reading (with popen() ) the return from a grep search. However, using
read() or readlines() also reads in "\n" after every result. Anyone know
how I can read it in without the newlines?
I could of course read through the list and remove the last two characters of
every item, but before i do that I wanted to make sure there isn't a function
that reads without including \n, \t, \r and such. Alternatively, maybe
someone can suggest a regex to parse it out (I don't know regular expressions
yet).
Thanks for any input!
-Jay
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00284" href="msg00284.html">[ale] Python - read in text minus "\n"</a></strong>
<ul><li><em>From:</em> scherrey at proteus-tech.com (Benjamin Scherrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00281.html">[ale] Speaker needed for Thursday's ALE Central meeting</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00283.html">[ale] AGP card slot issues, again</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00280.html">[ale] OT: Open java development position</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00284.html">[ale] Python - read in text minus "\n"</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00282"><strong>Date</strong></a></li>
<li><a href="threads.html#00282"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>