Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit df8c010

Browse filesBrowse files
committed
Flush file handles at the end, since Python 3 won't do it for us.
1 parent 87cf619 commit df8c010
Copy full SHA for df8c010

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎lib/matplotlib/backends/backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_ps.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ def write(self, *kl, **kwargs):
11791179
print("end", file=fh)
11801180
print("showpage", file=fh)
11811181
if not isEPSF: print("%%EOF", file=fh)
1182+
fh.flush()
11821183

11831184
if rcParams['ps.usedistiller'] == 'ghostscript':
11841185
gs_distill(tmpfile, isEPSF, ptype=papertype, bbox=bbox)
@@ -1293,6 +1294,7 @@ def write(self, *kl, **kwargs):
12931294
#print >>fh, "grestore"
12941295
print("end", file=fh)
12951296
print("showpage", file=fh)
1297+
fh.flush()
12961298

12971299
if isLandscape: # now we are ready to rotate
12981300
isLandscape = True

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.