Code:
proc = subprocess.Popen('myprogram',
stdin=subprocess.PIPE,
stdout=None
)
(stdoutdata, stderrdata) = proc.communicate('print hello')
print str(stdoutdata)
proc = subprocess.Popen('myprogram',
stdin=subprocess.PIPE,
stdout=None
)
(stdoutdata, stderrdata) = proc.communicate('print hello')
print str(stdoutdata)
proc = subprocess.Popen('myprogram',
stdin=subprocess.PIPE,
stdout=subprocess.PIPE
)
(stdoutdata, stderrdata)
output = Popen(["mycmd", "myarg"], stdin=PIPE,stdout=PIPE).communicate('prompt command')[0]
import codecs
f = open ('myfile')
test = f.readline ()
print test.decode ('utf-8')
names=['george', 'paul', 'john', 'ringo']
location='liverpool'
'||CHR(39)||p_status||CHR(39)||'
FUNCTION get_info
(
p_status IN VARCHAR2,
p_user IN VARCHAR2,
p_type IN VARCHAR2
)
RETURN SYS_REFCURSOR;
class myclass: def __init__(self)
class myclass:
__init__ (self, mystring1, mystring2)
self.name = mystring1
self.value = mystring2
__init__ (self, xmldoc):
Leave a comment: