Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import sys |
||
2 | |||
3 | |||
4 | def _istty(std): |
||
5 | try: |
||
6 | return std.isatty() |
||
7 | except Exception: |
||
8 | return False |
||
9 | |||
10 | |||
11 | _std = { |
||
12 | 'stderr': sys.stderr, |
||
13 | 'stdout': sys.stdout, |
||
14 | 'out': sys.stdout, |
||
15 | } |
||
16 | |||
17 | |||
18 | def istty(std): |
||
19 | return _istty(_std[std]) |
||
20 |