comparison roundup-admin @ 193:241a0323aacb

Used the much nicer load_package, pointed out by Steve Majewski.
author Richard Jones <richard@users.sourceforge.net>
date Fri, 03 Aug 2001 01:28:33 +0000
parents 996eaf90c01e
children c1461733cbf9
comparison
equal deleted inserted replaced
192:01a910e17403 193:241a0323aacb
1 #! /usr/bin/python 1 #! /usr/bin/python
2 # $Id: roundup-admin,v 1.11 2001-08-03 00:59:34 richard Exp $ 2 # $Id: roundup-admin,v 1.12 2001-08-03 01:28:33 richard Exp $
3 3
4 import sys 4 import sys
5 if int(sys.version[0]) < 2: 5 if int(sys.version[0]) < 2:
6 print 'Roundup requires python 2.0 or later.' 6 print 'Roundup requires python 2.0 or later.'
7 sys.exit(1) 7 sys.exit(1)
379 name = raw_input('Login name: ') 379 name = raw_input('Login name: ')
380 while not password: 380 while not password:
381 password = getpass.getpass(' password: ') 381 password = getpass.getpass(' password: ')
382 382
383 # get the instance 383 # get the instance
384 instance = imp.load_module('instance', None, instance_home, ('', '', 5)) 384 instance = imp.load_package('instance', instance_home)
385 385
386 function = figureCommands().get(command, None) 386 function = figureCommands().get(command, None)
387 387
388 # not a valid command 388 # not a valid command
389 if function is None: 389 if function is None:
402 if __name__ == '__main__': 402 if __name__ == '__main__':
403 sys.exit(main()) 403 sys.exit(main())
404 404
405 # 405 #
406 # $Log: not supported by cvs2svn $ 406 # $Log: not supported by cvs2svn $
407 # Revision 1.11 2001/08/03 00:59:34 richard
408 # Instance import now imports the instance using imp.load_module so that
409 # we can have instance homes of "roundup" or other existing python package
410 # names.
411 #
407 # Revision 1.10 2001/07/30 08:12:17 richard 412 # Revision 1.10 2001/07/30 08:12:17 richard
408 # Added time logging and file uploading to the templates. 413 # Added time logging and file uploading to the templates.
409 # 414 #
410 # Revision 1.9 2001/07/30 03:52:55 richard 415 # Revision 1.9 2001/07/30 03:52:55 richard
411 # init help now lists templates and backends 416 # init help now lists templates and backends

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