Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

248
Visualizações
SimpleHTTPServer which will allow an ajax request to execute a PY file?

i was going to make a simple web interface for a Python script / module I am working on. I figured to submit the form which would do 1 of 2 options. Modify a config json file and run the python script, or submit a form to the python script and execute it.

Simply put, i know when working with some other applications, Apache for example, you need to configure it such that it accepts .py files as executable. Is that the same case with SimpleHTTPServer? If so, how?

I was looking at: https://docs.python.org/2/library/simplehttpserver.html

I was also looking at BaseHTTPServer at https://docs.python.org/2/library/basehttpserver.html#BaseHTTPServer.BaseHTTPRequestHandler though nothing was jumping out at me during configuration

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

you can enable the CGI (Common Gateway Interface https://en.wikipedia.org/wiki/Common_Gateway_Interface ) of the SimpleHTTPServer, see the following thread How to host python cgi script with `python -m SimpleHTTPServer 8000` or `python -m CGIHTTPServer 8000`?

this is similar to get Django running ( https://en.wikipedia.org/wiki/Django_(web_framework) ) . Django is enabled using the mod_wsgi module or FastCGI on a WSGI-compatible webserver (Apache,...).

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda