Mercurial > vim
comparison src/testdir/test_channel_pipe.py @ 8031:ece323e2b57f v7.4.1310
commit https://github.com/vim/vim/commit/6463ca229cb9412581419497924c85fcbfc854ab
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 13 17:04:46 2016 +0100
patch 7.4.1310
Problem: Jobs don't open a channel.
Solution: Create pipes and add them to the channel. Add ch_logfile().
Only Unix for now.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 13 Feb 2016 17:15:05 +0100 |
parents | |
children | 3ea56a74077f |
comparison
equal
deleted
inserted
replaced
8030:05f57db9d8da | 8031:ece323e2b57f |
---|---|
1 #!/usr/bin/python | |
2 # | |
3 # Server that will communicate over stdin/stderr | |
4 # | |
5 # This requires Python 2.6 or later. | |
6 | |
7 from __future__ import print_function | |
8 import sys | |
9 | |
10 if __name__ == "__main__": | |
11 | |
12 if len(sys.argv) > 1: | |
13 print(sys.argv[1]) | |
14 | |
15 while True: | |
16 typed = sys.stdin.readline() | |
17 if typed.startswith("quit"): | |
18 print("Goodbye!") | |
19 sys.stdout.flush() | |
20 break | |
21 if typed.startswith("echo"): | |
22 print(typed[5:-1]) | |
23 sys.stdout.flush() | |
24 |