[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/examples/python schema.py
From: |
Neil Tiffin |
Subject: |
gnue/geas/examples/python schema.py |
Date: |
Fri, 05 Oct 2001 12:52:13 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/10/05 12:52:12
Modified files:
geas/examples/python: schema.py
Log message:
Minor revisions to input handling.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/examples/python/schema.py.diff?cvsroot=OldCVS&tr1=1.15&tr2=1.16&r1=text&r2=text
Patches:
Index: gnue/geas/examples/python/schema.py
diff -u gnue/geas/examples/python/schema.py:1.15
gnue/geas/examples/python/schema.py:1.16
--- gnue/geas/examples/python/schema.py:1.15 Mon Oct 1 14:29:10 2001
+++ gnue/geas/examples/python/schema.py Fri Oct 5 12:52:12 2001
@@ -7,7 +7,7 @@
# a test file: relies on GEAS being run from gnue/geas/src
# and this from gnue/geas/examples/python
#
-# $Id: schema.py,v 1.15 2001/10/01 18:29:10 ntiffin Exp $
+# $Id: schema.py,v 1.16 2001/10/05 16:52:12 ntiffin Exp $
import re
import sys
@@ -103,7 +103,7 @@
def get_numeric_input(a_string, min_value, max_value):
idx = max_value + 1
while idx < min_value or idx > max_value:
- print a_string + " [" + str(min_value) + "-" + str(max_value) + "]",
+ print a_string + " [q, return, " + str(min_value) + "-" + str(max_value)
+ "]",
cmd = raw_input(" ")
if cmd == "Q" or cmd == "q":
print ""
@@ -125,14 +125,14 @@
if i % 2 == 0:
print rjust(str(i),4) + " " + ljust(name,32)
if i % 24 == 0:
- data = get_numeric_input( "Select a class number to display
[q,return]", 0, len(classnames) )
+ data = get_numeric_input( "Select a class number to display?", 0,
len(classnames) )
if data != 0:
return data
else:
print rjust(str(i),4) + " " + ljust(name,32) + " ",
i = i + 1
else:
- data = get_numeric_input( "Select a class number to display [q,return]",
0, len(classnames) )
+ data = get_numeric_input( "Select a class number to display?", 0,
len(classnames) )
if data != 0:
return data