faqts : Computers : Programming : Languages : Python : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 4 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

How can I do this Perl paragraph mode in Python? $/ = ''; # paragraph mode

Jul 9th, 2000 23:02
unknown unknown, Harry George


If you use pyperl:
p=pyperl.Pyperl()
p.INPUT_RECORD_SEPARATOR=''
myfile=p.open("< $filename")
lines=myfile.readlines()