tests/printenv.py
changeset 7080 a6477aa893b8
parent 4659 7a7d4937272b
child 7186 f77c8d8331ca
equal deleted inserted replaced
7079:0b74409d5858 7080:a6477aa893b8
    13 #   - [output] is the name of the output file (default: use sys.stdout)
    13 #   - [output] is the name of the output file (default: use sys.stdout)
    14 #              the file will be opened in append mode.
    14 #              the file will be opened in append mode.
    15 #
    15 #
    16 import os
    16 import os
    17 import sys
    17 import sys
       
    18 
       
    19 try:
       
    20     import msvcrt
       
    21     msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
       
    22     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
       
    23     msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)        
       
    24 except ImportError:
       
    25     pass
    18 
    26 
    19 exitcode = 0
    27 exitcode = 0
    20 out = sys.stdout
    28 out = sys.stdout
    21 
    29 
    22 name = sys.argv[1]
    30 name = sys.argv[1]