Mercurial > p > roundup > code
comparison roundup-admin @ 297:1bbc16563d89
Now with readline support :)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 17 Oct 2001 06:17:26 +0000 |
| parents | e155eca83f40 |
| children | 07a64ec2a79d |
comparison
equal
deleted
inserted
replaced
| 296:e155eca83f40 | 297:1bbc16563d89 |
|---|---|
| 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: roundup-admin,v 1.30 2001-10-17 06:04:00 richard Exp $ | 19 # $Id: roundup-admin,v 1.31 2001-10-17 06:17:26 richard Exp $ |
| 20 | 20 |
| 21 import sys | 21 import sys |
| 22 if int(sys.version[0]) < 2: | 22 if int(sys.version[0]) < 2: |
| 23 print 'Roundup requires python 2.0 or later.' | 23 print 'Roundup requires python 2.0 or later.' |
| 24 sys.exit(1) | 24 sys.exit(1) |
| 577 return 1 | 577 return 1 |
| 578 | 578 |
| 579 def interactive(self, ws_re=re.compile(r'\s+')): | 579 def interactive(self, ws_re=re.compile(r'\s+')): |
| 580 '''Run in an interactive mode | 580 '''Run in an interactive mode |
| 581 ''' | 581 ''' |
| 582 try: | |
| 583 import readline | |
| 584 except ImportError: | |
| 585 print "Note: command history and editing not available" | |
| 586 | |
| 582 while 1: | 587 while 1: |
| 583 try: | 588 try: |
| 584 command = raw_input('roundup> ') | 589 command = raw_input('roundup> ') |
| 585 except EOFError: | 590 except EOFError: |
| 586 print '.. exit' | 591 print '.. exit' |
| 622 tool = AdminTool() | 627 tool = AdminTool() |
| 623 sys.exit(tool.main()) | 628 sys.exit(tool.main()) |
| 624 | 629 |
| 625 # | 630 # |
| 626 # $Log: not supported by cvs2svn $ | 631 # $Log: not supported by cvs2svn $ |
| 632 # Revision 1.30 2001/10/17 06:04:00 richard | |
| 633 # Beginnings of an interactive mode for roundup-admin | |
| 634 # | |
| 627 # Revision 1.29 2001/10/16 03:48:01 richard | 635 # Revision 1.29 2001/10/16 03:48:01 richard |
| 628 # admin tool now complains if a "find" is attempted with a non-link property. | 636 # admin tool now complains if a "find" is attempted with a non-link property. |
| 629 # | 637 # |
| 630 # Revision 1.28 2001/10/13 00:07:39 richard | 638 # Revision 1.28 2001/10/13 00:07:39 richard |
| 631 # More help in admin tool. | 639 # More help in admin tool. |
