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

remove documentation about speciality of setupterm's descriptor, use os.devnull #59

Closed
jquast opened this issue Oct 9, 2015 · 1 comment

Comments

@jquast
Copy link
Owner

jquast commented Oct 9, 2015

It's actually perfectly fine to call curses.setupterm(kind, open(os.devnull).fileno()).

More importantly, this removes a chunk of documentation and comments, such as:

            Terminal initialization sequences will be sent to ``stream`` if it
            has a file descriptor and to ``sys.__stdout__`` otherwise. (``setupterm()`` demands to send them
            somewhere, and stdout is probably where the output is ultimately
            headed. If not, stderr is probably bound to the same terminal.)

and

            # (...) Explicit args make setupterm()
            # work even when -s is passed to nosetests. Lean toward sending
            # init sequences to the stream if it has a file descriptor, and
            # send them to stdout as a fallback, since they have to go
            # somewhere.

This issue backports upstream erikrose#95

@jquast
Copy link
Owner Author

jquast commented Feb 3, 2020

Although it is fine, I'm having a hard time dealing with the file descriptor leaks, see comments in #146

jquast added a commit that referenced this issue Feb 3, 2020
- move "styles" section from colors.rst to terminal.rst
- add term.link("https://example.com", "example.com") hyperlink support
- add bin/cnn.py news example
- revert this setupterm() experiment #59, discussed in #146
- ignore ValueError for multiprocessing environments #146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant