Skip to content

Add isatty() method to PythonQtStdIn class #49

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

Closed
wants to merge 1 commit into from
Closed

Add isatty() method to PythonQtStdIn class #49

wants to merge 1 commit into from

Conversation

fepegar
Copy link
Contributor

@fepegar fepegar commented Jun 23, 2021

Resolves #48.

Context: Slicer/Slicer#5705.

Copy link
Contributor

@lassoan lassoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but it would be better if you added a bool _isatty{false} member to PythonQtStdInRedirect and return the value of this in isatty(). This would allow using this class to stream input from an interactive terminal.

@fepegar
Copy link
Contributor Author

fepegar commented Jun 23, 2021

Thanks for reviewing, @lassoan.

added a bool _isatty{false} member to PythonQtStdInRedirect

Sorry, I don't know how to do that. I don't know much C++.

@lassoan
Copy link
Contributor

lassoan commented Jun 23, 2021

@fepegar I could not update your pull request, so created a new one: #50

I've tested it in Slicer and verified that light-the-torch package can be installed and imported correctly.

@fepegar
Copy link
Contributor Author

fepegar commented Jun 23, 2021

Great! Thanks, @lassoan. I see what you mean by adding a new member. It wasn't that hard! Next time I'll know what to do.

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.

Add .isatty() to PythonQtStdIn
2 participants