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

Add an easy way to write output to a file. #31

Open
gruns opened this issue May 13, 2019 · 2 comments
Open

Add an easy way to write output to a file. #31

gruns opened this issue May 13, 2019 · 2 comments

Comments

@gruns
Copy link
Owner

gruns commented May 13, 2019

Perhaps another shortcut parameter to ic.configureOutput().

@gruns
Copy link
Owner Author

gruns commented Apr 17, 2021

one way to do it: #58 (comment)

@alexmojaki
Copy link
Collaborator

snoop and pysnooper both do what's described in that comment. You can also pass a Path object. And if you pass a Path or string so that the file is opened for you, you can also pass overwrite=True which uses open(path, 'w') at the beginning to clear the file. Otherwise it appends to the file by default so that logs are preserved between runs.

I think there should also be a color argument. It's more discoverable than the current method and it means users can still have color no matter where output is written.

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

No branches or pull requests

2 participants