File: pyk.py

package info (click to toggle)
yorick-yutils 1.3.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 604 kB
  • ctags: 17
  • sloc: makefile: 105; python: 12
file content (20 lines) | stat: -rwxr-xr-x 419 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python

def pyk(self,msg):
    # sends string command to yorick
    sys.stdout.write(msg)
    sys.stdout.flush()
 
# if this flag set, yorick is blocked waiting for tyk_resume
_tyk_blocked=0

def pyk_sync(self):
    _tyk_blocked=1
    sys.stdout.write('-s+y-n+c-+p-y+k-')
    sys.stdout.flush()

def pyk_resume(self):
    sys.stdout.write('pyk_resume'+msg)
    sys.stdout.flush()
    _tyk_blocked=0