~ubuntu-branches/debian/sid/web2py/sid

« back to all changes in this revision

Viewing changes to gluon/widget.py

  • Committer: Bazaar Package Importer
  • Author(s): José L. Redrejo Rodríguez
  • Date: 2011-06-02 16:55:29 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110602165529-wq73zmx3zy9pc3ul
Tags: 1.96.1-1
* New upstream version
* Move wsgihandler.py from python-web2py to examples of python-gluon
* Added subwsgihandler.py to python-gluon examples (as a patch)
* Added web2py.apache-subdir and updated web2py.apache and README.Debian
* Refreshed debian/patches/avoid_upgrading 

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
except NameError:
47
47
    BaseException = Exception
48
48
 
49
 
ProgramName = 'web2py Enterprise Web Framework'
 
49
ProgramName = 'web2py Web Framework'
50
50
ProgramAuthor = 'Created by Massimo Di Pierro, Copyright 2007-2011'
51
51
versioninfo = open('VERSION', 'r')
52
52
ProgramVersion = versioninfo.read().strip()
987
987
                      default=None,
988
988
                      help='should be followed by a list of arguments to be passed to script, to be used with -S, -A must be the last option')
989
989
 
 
990
    parser.add_option('--no-banner',
 
991
                      action='store_true',
 
992
                      default=False,
 
993
                      dest='nobanner',
 
994
                      help='Do not print header banner')
 
995
 
990
996
    msg = 'listen on multiple addresses: "ip:port:cert:key;ip2:port2:cert2:key2;..." (:cert:key optional; no spaces)'
991
997
    parser.add_option('--interfaces',
992
998
                      action='store',
1057
1063
 
1058
1064
    (options, args) = console()
1059
1065
 
1060
 
    print ProgramName
1061
 
    print ProgramAuthor
1062
 
    print ProgramVersion
 
1066
    if not options.nobanner:
 
1067
        print ProgramName
 
1068
        print ProgramAuthor
 
1069
        print ProgramVersion
1063
1070
 
1064
1071
    from dal import drivers
1065
 
    print 'Database drivers available: %s' % ', '.join(drivers)
 
1072
    if not options.nobanner:
 
1073
        print 'Database drivers available: %s' % ', '.join(drivers)
1066
1074
 
1067
1075
 
1068
1076
    # ## if -L load options from options.config file
1069
1077
    if options.config:
1070
1078
        try:
1071
 
            options2 = __import__(options.config, [], [], '')
 
1079
            options2 = __import__(options.config, {}, {}, '')
1072
1080
        except Exception:
1073
1081
            try:
1074
1082
                # Jython doesn't like the extra stuff
1075
 
                options = __import__(options.config)
 
1083
                options2 = __import__(options.config)
1076
1084
            except Exception:
1077
1085
                print 'Cannot import config file [%s]' % options.config
1078
1086
                sys.exit(1)
1197
1205
    if not root and options.password == '<ask>':
1198
1206
        options.password = raw_input('choose a password:')
1199
1207
 
1200
 
    if not options.password:
 
1208
    if not options.password and not options.nobanner:
1201
1209
        print 'no password, no admin interface'
1202
1210
 
1203
1211
    # ## start server
1204
1212
 
1205
1213
    (ip, port) = (options.ip, int(options.port))
1206
1214
 
1207
 
    print 'please visit:'
1208
 
    print '\thttp://%s:%s' % (ip, port)
1209
 
    print 'use "kill -SIGTERM %i" to shutdown the web2py server' % os.getpid()
 
1215
    if not options.nobanner:
 
1216
        print 'please visit:'
 
1217
        print '\thttp://%s:%s' % (ip, port)
 
1218
        print 'use "kill -SIGTERM %i" to shutdown the web2py server' % os.getpid()
1210
1219
 
1211
1220
    server = main.HttpServer(ip=ip,
1212
1221
                             port=port,