Files
procs/pipes.py
T
Shrayas 14d54d88b2 Adresses #1
- Renames standard streams to ones without the underscore.
- Retains subprocess' way of doing returncode as opposed to exit_code
- t.py doesn't make sense, calling it usage.py
2014-10-31 01:02:38 +05:30

51 lines
762 B
Python

import os
import subprocess
class Process(object):
def __init__(self, command):
pass
def start(self):
pass
@property
def stdin(self):
return 'stdin'
@property
def stdout(self):
return 'stdout'
@property
def stderr(self):
return 'stderr'
class Chain(object):
def __init__(self):
self.processes = []
def process(self, command):
p = Process(command)
self.processes.append(p)
return p
def link(self, x, y):
print 'Linking {} to {}'.format(x, y)
def start(self, wait=False):
for process in self.processes:
process.start()
# wait=wait
def chain():
return Chain()
def process():
pass