~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/twisted/test/process_stdinreader.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
 
2
# See LICENSE for details.
 
3
 
 
4
"""Script used by twisted.test.test_process on win32."""
 
5
 
 
6
import sys, time, os, msvcrt
 
7
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
 
8
msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
 
9
 
 
10
 
 
11
sys.stdout.write("out\n")
 
12
sys.stdout.flush()
 
13
sys.stderr.write("err\n")
 
14
sys.stderr.flush()
 
15
 
 
16
data = sys.stdin.read()
 
17
 
 
18
sys.stdout.write(data)
 
19
sys.stdout.write("\nout\n")
 
20
sys.stderr.write("err\n")
 
21
 
 
22
sys.stdout.flush()
 
23
sys.stderr.flush()