Python Forum
testing if open to a terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
testing if open to a terminal
#1
the "test" command on Unix/Linux/Posix systems does have a means to test if a specified file descriptor is is open to a terminal or not. it does it like: test -t 1 i am looking for the pythonic way to do this. in general, i will need to apply this to stdin and less often to stdout and maybe sometimes stderr or other things.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  testing an open file Skaperen 7 1,300 Dec-20-2022, 02:19 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020