Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue mikedewar/d3py#23 #25

Merged
merged 1 commit into from
Feb 16, 2012
Merged

Conversation

mynameisfiber
Copy link
Collaborator

This fixes the problem by allowing users to go into non-interactive mode
(endabled by default). One problem this fix has made apparent is that
del is not what we want to cleanup files: the reference count could
be at zero even if we have stale files lying around!

One solution would be to use enter and exit and require the user
to create a figure object with the with statement:

with Figure() as fig:
...do stuff with fig...

ideas?

This fixes the problem by allowing users to go into non-interactive mode
(endabled by default).  One problem this fix has made apparent is that
__del__ is not what we want to cleanup files: the reference count could
be at zero even if we have stale files lying around!

One solution would be to use __enter__ and __exit__ and require the user
to create a figure object with the `with` statement:

with Figure() as fig:
    ...do stuff with fig...

ideas?
This was referenced Feb 16, 2012
@mikedewar
Copy link
Owner

Hey I'm going to raise an issue over the del thing and then come back and make this merge.

mikedewar added a commit that referenced this pull request Feb 16, 2012
@mikedewar mikedewar merged commit d8eb80c into mikedewar:master Feb 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants