Пример #1
0
def main(*args, **kwargs):
    import os
    this_file = '%s/bin/activate_this.py' % os.environ['VIRTUAL_ENV']
    execfile(this_file, dict(__file__=this_file))

    from paste.script.serve import ServeCommand

    ServeCommand("serve")  #.run(["development.ini"])
Пример #2
0
def main():
    os.environ['PASTE_CONFIG_FILE'] = get_default_config()

    cmd = ServeCommand('karl')
    cmd.description = """\
    Run the KARL application.

    If start/stop/restart is given, then --daemon is implied, and it will
    start (normal operation), stop (--stop-daemon), or do both.

    You can also include variable assignments like 'http_port=8080'
    and then use %(http_port)s in your config files.
    """
    exit_code = cmd.run(sys.argv[1:])
    sys.exit(exit_code)
Пример #3
0
def serve_app(args=None, default_config=''):
    config = default_config
    type = 'prod'

    # Load from comand line if we didn't get them as params.
    if args is None:
        import sys
        args = sys.argv[1:]

    # Load values from args if available.
    if len(args) > 0:
        config = args[0]
    if len(args) > 1:
        type = args[1]

    # Add the reload param if developing.
    if type == 'prod':
        params = [config]
    else:
        params = ["--reload", config]

    ServeCommand("serve").run(params)
Пример #4
0
from paste.script.serve import ServeCommand
ServeCommand("serve").run(["development.ini"])
Пример #5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Start the Paster server

Given command line arguments will be passed through
'''
#
## SAUCE - System for AUtomated Code Evaluation
## Copyright (C) 2013 Moritz Schlarb
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

import sys
from paste.script.serve import ServeCommand

if __name__ == '__main__':
    ServeCommand("serve").run(sys.argv[1:] or ['--reload', 'development.ini'])
Пример #6
0
## SAUCE - System for AUtomated Code Evaluation
## Copyright (C) 2013 Moritz Schlarb
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
'''Start the Paster server

Given command line arguments will be passed through
'''

import sys
from paste.script.serve import ServeCommand

if __name__ == '__main__':
    if len(sys.argv) == 1:
        args = ['--reload', 'development.ini']
    else:
        args = sys.argv[1:]
    ServeCommand("serve").run(args)
Пример #7
0
#!/usr/lib/ckan/default/bin paster

from paste.script.serve import ServeCommand

ServeCommand("serve").run(["/etc/ckan/default/development.ini"])
Пример #8
0
"""NDG OAuth 2.0 

Example paster script to run short-lived credential service example client app
"""
__author__ = "Philip Kershaw"
__date__ = "24/08/12"
__copyright__ = "(C) 2012 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "*****@*****.**"
__revision__ = "$Id$"
from paste.script.serve import ServeCommand

ServeCommand("serve").run(["./slcs_client_app.ini"])
"""NDG OAuth 2.0 

Example paster script to run bearer token example client app
"""
__author__ = "Philip Kershaw"
__date__ = "24/08/12"
__copyright__ = "(C) 2012 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "*****@*****.**"
__revision__ = "$Id$"
from paste.script.serve import ServeCommand

ServeCommand("serve").run(["./bearer_tok_client_app.ini"])