On Wed, Jul 02, 2014 at 09:14:17PM +0100, andy pugh wrote:
> Could comp pre-process the file to fix the line endings?
Personally, I am spiteful and would rather just delete all a user's
files when it's been discovered that he came within ten meters of a
Windows computer.
def parse(filename):
initialize()
f = open(filename).read()
+ if '\r' in f: throw SystemExit, "Input file contains non-unix line endings"
a, b = f.split("\n;;\n", 1)
That said, Python has supported a feature called "universal newlines"
since 2.3, so the fix might be as simple as enabling it (change to
comp.g around line 120):
def parse(filename):
initialize()
- f = open(filename).read()
+ f = open(filename, "u").read()
a, b = f.split("\n;;\n", 1)
(all proposed changes untested)
If that change tests out, and you like making life better for users, be
my guest.
Jeff
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers