Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 881518 Details for
Bug 1082363
New Python directory structure and wsgi.py
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
app.py
app.py (text/plain), 1.25 KB, created by
David O'Connor
on 2014-04-01 20:25:08 UTC
(
hide
)
Description:
app.py
Filename:
MIME Type:
Creator:
David O'Connor
Created:
2014-04-01 20:25:08 UTC
Size:
1.25 KB
patch
obsolete
>#!/usr/bin/env python >import imp >import os > >try: > zvirtenv = os.path.join(os.environ['OPENSHIFT_PYTHON_DIR'], > 'virtenv', 'bin', 'activate_this.py') > exec(compile(open(zvirtenv).read(), zvirtenv, 'exec'), > dict(__file__ = zvirtenv) ) >except IOError: > pass > >def run_cherrypy_server(app, ip, port=8080): > from cherrypy import wsgiserver > server = wsgiserver.CherryPyWSGIServer( > (ip, port), app, server_name='www.cherrypy.example') > server.start() > >def run_simple_httpd_server(app, ip, port=8080): > from wsgiref.simple_server import make_server > make_server(ip, port, app).serve_forever() > ># ># IMPORTANT: Put any additional includes below this line. If placed above this ># line, it's possible required libraries won't be in your searchable path ># > ># ># main(): ># >if __name__ == '__main__': > ip = os.environ['OPENSHIFT_PYTHON_IP'] > port = int(os.environ['OPENSHIFT_PYTHON_PORT']) > zapp = imp.load_source('application', 'wsgi/application') > > print('Starting WSGIServer on %s:%d ... ' % (ip, port)) > try: > run_cherrypy_server(zapp.application, ip, port) > except: > print("cherrypy probably not installed - using default simple server ...") > run_simple_httpd_server(zapp.application, ip, port)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1082363
:
880443
|
881517
|
881518
|
882738
|
882808