Skip to content

Commit

Permalink
Merge pull request #109 from keflavich/py3_fixed_writer
Browse files Browse the repository at this point in the history
Cleanup in writer
  • Loading branch information
cdeil committed Apr 14, 2017
2 parents 9586efd + f755889 commit 1ed4673
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyregion/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def write(self, outfile):
for a in attr0 if a != 'text'])

# first line is globals
print >> outf, "global", defaultline
outf.write("global {0}\n".format(defaultline))
# second line must be a coordinate format
print >> outf, prev_cs
outf.write("{0}\n".format(prev_cs))

for shape in self:
shape_attr = '' if prev_cs == shape.coord_format \
Expand All @@ -206,7 +206,7 @@ def write(self, outfile):
shape_str = shape_attr + shape_excl + shape.name + \
shape_coords + shape_comment

print >> outf, shape_str
outf.write("{0}\n".format(shape_str))

except IOError as e:
cmsg = "Unable to create region file \'{:s}\'.".format(outfile)
Expand Down

0 comments on commit 1ed4673

Please sign in to comment.