In order to load an xml document into a parser I need to strip '\n' and
'\r', This is how I am doing it and it works:
f = open(sys.argv[1], 'r')
s = f.read()
f.close()
# remove returns
s = s.replace('\n', '')
s = s.replace('\r', '')
o = open('testo.imf', 'w')
o.write(s)
o.close()
Is there a better way? IOW perform the stripping directly on the input
file?
--
Jeff
Jeff Johnson
[EMAIL PROTECTED]
SanDC, Inc.
623-582-0323
Fax 623-869-0675
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]