Mercurial > p > roundup > code
comparison roundup/admin.py @ 582:2fc4f8942a59
allow abbreviation of "help" in admin tool too.
| author | Engelbert Gruber <grubert@users.sourceforge.net> |
|---|---|
| date | Wed, 23 Jan 2002 07:27:19 +0000 |
| parents | 62febbd7ffec |
| children | 300e17e7045c |
comparison
equal
deleted
inserted
replaced
| 581:137d7fc5234d | 582:2fc4f8942a59 |
|---|---|
| 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: admin.py,v 1.5 2002-01-21 16:33:19 rochecompaan Exp $ | 19 # $Id: admin.py,v 1.6 2002-01-23 07:27:19 grubert Exp $ |
| 20 | 20 |
| 21 import sys, os, getpass, getopt, re, UserDict, shlex | 21 import sys, os, getpass, getopt, re, UserDict, shlex |
| 22 try: | 22 try: |
| 23 import csv | 23 import csv |
| 24 except ImportError: | 24 except ImportError: |
| 207 commands -- list commands | 207 commands -- list commands |
| 208 <command> -- help specific to a command | 208 <command> -- help specific to a command |
| 209 initopts -- init command options | 209 initopts -- init command options |
| 210 all -- all available help | 210 all -- all available help |
| 211 ''' | 211 ''' |
| 212 topic = args[0] | 212 if len(args)>0: |
| 213 topic = args[0] | |
| 214 else: | |
| 215 topic = 'help' | |
| 216 | |
| 213 | 217 |
| 214 # try help_ methods | 218 # try help_ methods |
| 215 if self.help.has_key(topic): | 219 if self.help.has_key(topic): |
| 216 self.help[topic]() | 220 self.help[topic]() |
| 217 return 0 | 221 return 0 |
| 1033 tool = AdminTool() | 1037 tool = AdminTool() |
| 1034 sys.exit(tool.main()) | 1038 sys.exit(tool.main()) |
| 1035 | 1039 |
| 1036 # | 1040 # |
| 1037 # $Log: not supported by cvs2svn $ | 1041 # $Log: not supported by cvs2svn $ |
| 1042 # Revision 1.5 2002/01/21 16:33:19 rochecompaan | |
| 1043 # You can now use the roundup-admin tool to pack the database | |
| 1044 # | |
| 1038 # Revision 1.4 2002/01/14 06:51:09 richard | 1045 # Revision 1.4 2002/01/14 06:51:09 richard |
| 1039 # . #503164 ] create and passwords | 1046 # . #503164 ] create and passwords |
| 1040 # | 1047 # |
| 1041 # Revision 1.3 2002/01/08 05:26:32 rochecompaan | 1048 # Revision 1.3 2002/01/08 05:26:32 rochecompaan |
| 1042 # Missing "self" in props_from_args | 1049 # Missing "self" in props_from_args |
