null+****@clear*****
null+****@clear*****
2012年 4月 27日 (金) 18:21:05 JST
Kouhei Sutou 2012-04-27 18:21:05 +0900 (Fri, 27 Apr 2012)
New Revision: 43e49ee654dec7b05ee7b4f8177023e521c34e8b
Log:
doc: use meaningful name
Modified files:
doc/update_execution_example.py
Modified: doc/update_execution_example.py (+11 -11)
===================================================================
--- doc/update_execution_example.py 2012-04-27 18:16:07 +0900 (2068002)
+++ doc/update_execution_example.py 2012-04-27 18:21:05 +0900 (740a22c)
@@ -35,25 +35,25 @@ def reconnect(name):
fout = None
-def execmd(cmd, fout):
- a = '> ' + cmd + "\n"
- stdout.write(a)
+def execmd(command, fout):
+ formatted_command_line = '> ' + command + "\n"
+ stdout.write(formatted_command_line)
stdout.flush()
- groonga_process.stdin.write(cmd + "\n")
+ groonga_process.stdin.write(command + "\n")
groonga_process.stdin.flush()
if fout:
- fout.write(a + " ")
+ fout.write(formatted_command_line + " ")
while True:
out = select([groonga_process.stdout], [], [], 0.2)
if len(out[0]):
- a = groonga_process.stdout.read(1)
- if a != None:
- stdout.write(a)
+ char = groonga_process.stdout.read(1)
+ if char != None:
+ stdout.write(char)
if fout:
- if a == '\n':
- fout.write(a + " ")
+ if char == '\n':
+ fout.write(char + " ")
else:
- fout.write(a)
+ fout.write(char)
else:
stdout.flush()
break