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

Replace output redirector #30

Closed
z2v opened this issue Apr 24, 2014 · 1 comment · Fixed by #76
Closed

Replace output redirector #30

z2v opened this issue Apr 24, 2014 · 1 comment · Fixed by #76
Assignees

Comments

@z2v
Copy link
Collaborator

z2v commented Apr 24, 2014

Current output redirector (see PyDSTool.Redirector class) has several issues:

  • must be manually started/stopped
  • does not properly handle exceptions, which raise between start and stop calls
  • hardcoded to use temporary files, which are deleted when redirector is stopped

So suggestion is to replace current redirector with the one, which support context manager API (this will fix first two issues) and optionally support different targets for redirection. Something, like in this recipe.

z2v added a commit to z2v/pydstool that referenced this issue Apr 24, 2014
Actually, this in not a real fix. The problem is deeper.
`Redirector` doesn't properly handle exceptions, which raise between
`start` and `stop` calls.

So better is to replace current redirector with new one, which supports
context manager API (see issue robclewley#30)
@robclewley
Copy link
Owner

The recipe looks great. Good idea.

@robclewley robclewley reopened this Apr 24, 2014
@z2v z2v self-assigned this Apr 24, 2014
z2v added a commit to z2v/pydstool that referenced this issue May 8, 2014
Commented out check in `PyDSTool\Model.py` needs to be investigated
deeper. See comment in code and discussion in issue robclewley#30.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants