Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

backend_ps: Do not write to a temporary file unless using an external distiller#1826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mgiuca-google
Copy link
Contributor

Ifps.usedistiller is omitted, writes directly to the output file, instead of creating a temporary file and subsequently copying it to the output.

This is more efficient, and also works on restricted platforms such as Google App Engine, which are unable to provide a writable temporary file system.

Partial fix for Issue#1823.

@pelson
Copy link
Member

I'm not sure who our resident PS expert is.@jkseppan?@mdboom - any ideas?

@mdboom
Copy link
Member

This looks fine to me.

@pelson
Copy link
Member

Is there any documentation needed for this change? Is theps.usedistiller== False new functionality?

@mdboom
Copy link
Member

I don't think it's new functionality, only that it will now write directly to a file, rather than to a temporary and then moved. I suppose if someone was relying on the old behavior that may be a problem -- but this change I think ultimately makes things less surprising.

… distiller.If ps.usedistiller is omitted, writes directly to the output file, instead ofcreating a temporary file and subsequently copying it to the output.This is more efficient, and also works on restricted platforms such as GoogleApp Engine, which are unable to provide a writable temporary file system.
@mgiuca-google
Copy link
ContributorAuthor

To clarify, you cannot write "ps.usedistiller = False" in the matplotlibrc. When I said "is False", I meant if the Python variable is False, which it is ifps.usedistiller is omitted from the matplotlibrc. I have changed the Git commit message to clarify.

I don't see how someone could be broken by this change. There is no noticeable difference between the old and new behaviour unless you are watching the temporary directory for files being written and quickly deleted. As far as I can tell, the only difference is that it works even if there is no writable temporary directory.

@mdboom
Copy link
Member

I was thinking more about a difference caused by using a stream vs. a random access file handle. (We've had similar issues with the PDF backend). But it seems that the postscript backend doesn't exhibit such problems. I think this is good to go.

mdboom added a commit that referenced this pull requestMar 19, 2013
backend_ps: Do not write to a temporary file unless using an external distiller
@mdboommdboom merged commit4703f2f intomatplotlib:masterMar 19, 2013
@mgiuca-googlemgiuca-google deleted the backend_ps-no-temp-file branchMarch 21, 2013 03:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mgiuca-google@pelson@mdboom

[8]ページ先頭

©2009-2025 Movatter.jp