PEP 333;
wsgi2cgi Python WSGI protokolü & nbsp altında CGI uygulamaları çalıştırmak için bir araçtır.
Bu harici işlem yürütür ve Ortak Ağ Geçidi Arabirimi (CGI) ile WSGI protokolünü çevirir basit bir WSGI uygulamasıdır.
Örnek:
& Nbsp; >>> wsgiref.simple_server ithalat make_server gelen
& Nbsp; >>> import wsgi2cgi
& Nbsp; >>> def uygulaması (environ, start_response):
& Nbsp; >>> WAPP = wsgi2cgi.CGI ('/ yol / / executable.cgi için')
& Nbsp; >>> dönüş wapp.application (environ, start_response)
& Nbsp; >>> httpd = make_server ('127.0.0.1', 8000, app)
& Nbsp; >>> print "127.0.0.1:8000 üzerine hizmet veren ..."
& Nbsp; >>> httpd.serve_forever ()
WSGI uygulama WGSI destekleyen herhangi bir sunucu ile kullanılabilir.
Yükle
Modül setup.py kullanarak kaynaktan monte edilebilir:
& Nbsp; piton setup.py install
Alternativelly bu pip ile monte edilebilir:
& Nbsp; wsgi2cgi yüklemek pip
Gereksinimler :
- Python
Yorum Bulunamadı