example 1
1 from vms.starlet.ptdlib import Ptd
2 # create a pseudo terminal with the default prompt "pseudo_term> "
3 ptd = Ptd()
4 # read all lines until prompt
5 lines = ptd.read_until_prompt()
6 # print all read lines
7 for line in lines:
8 print line,
9 # execute the DCL command "show system"
10 e,lines = ptd.execute('show system')
11 # print the result
12 print e,
13 for line in lines:
14 print line,
