comparison roundup-admin @ 235:d7d358408537

added missing 'import' statements.
author Anthony Baxter <anthonybaxter@users.sourceforge.net>
date Tue, 28 Aug 2001 05:58:33 +0000
parents ad2c98faec97
children 96cdd8ef0581
comparison
equal deleted inserted replaced
234:0dfe39b4fa17 235:d7d358408537
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.16 2001-08-12 06:32:36 richard Exp $ 19 # $Id: roundup-admin,v 1.17 2001-08-28 05:58:33 anthonybaxter 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)
161 '''Usage: set designator[,designator]* propname=value ... 161 '''Usage: set designator[,designator]* propname=value ...
162 Set the given property of one or more designator(s). 162 Set the given property of one or more designator(s).
163 163
164 Sets the property to the value for all designators given. 164 Sets the property to the value for all designators given.
165 ''' 165 '''
166 from roundup import hyperdb
167
166 designators = string.split(args[0], ',') 168 designators = string.split(args[0], ',')
167 props = {} 169 props = {}
168 for prop in args[1:]: 170 for prop in args[1:]:
169 key, value = prop.split('=') 171 key, value = prop.split('=')
170 props[key] = value 172 props[key] = value
229 231
230 This creates a new entry of the given class using the property 232 This creates a new entry of the given class using the property
231 name=value arguments provided on the command line after the "create" 233 name=value arguments provided on the command line after the "create"
232 command. 234 command.
233 ''' 235 '''
236 from roundup import hyperdb
237
234 classname = args[0] 238 classname = args[0]
235 cl = db.getclass(classname) 239 cl = db.getclass(classname)
236 props = {} 240 props = {}
237 properties = cl.getprops() 241 properties = cl.getprops()
238 for prop in args[1:]: 242 for prop in args[1:]:
420 if __name__ == '__main__': 424 if __name__ == '__main__':
421 sys.exit(main()) 425 sys.exit(main())
422 426
423 # 427 #
424 # $Log: not supported by cvs2svn $ 428 # $Log: not supported by cvs2svn $
429 # Revision 1.16 2001/08/12 06:32:36 richard
430 # using isinstance(blah, Foo) now instead of isFooType
431 #
425 # Revision 1.15 2001/08/07 00:24:42 richard 432 # Revision 1.15 2001/08/07 00:24:42 richard
426 # stupid typo 433 # stupid typo
427 # 434 #
428 # Revision 1.14 2001/08/07 00:15:51 richard 435 # Revision 1.14 2001/08/07 00:15:51 richard
429 # Added the copyright/license notice to (nearly) all files at request of 436 # Added the copyright/license notice to (nearly) all files at request of

Roundup Issue Tracker: http://roundup-tracker.org/