correr archivos python en servidor

punchik punchik punchikk en yahoo.com
Lun Mayo 5 06:28:50 CEST 2008


el archivo python si envia la salida con formato html.. aca esta el codigo:

   
   
  #!/usr/bin/python
import cgitb
cgitb.enable()
  print "Content-type: text/html"
print
  import time
  print "<HTML>"
print "<HEAD>"
print "<TITLE>Penzilla.net:  What is the Time? Example</TITLE>"
print "</HEAD>"
print "<BODY>"
print "<H2>Penzilla.net What is the Time?(wittime.py) Example:</h2>"
print "<P>Penzilla thinks that it is: %s</P>" % time.ctime()
print "</BODY>"
print "</HTML>"

Marco Antonio Islas Cruz <markuz en islascruz.org> wrote:
  Los scripts en Python, asi como cualquier otro CGI deben enviar la
salida con formato HTML, incluyendo los headers. PHP lo hace, solo que
no te das cuenta de que lo hace.

Investiga sobre los headers del protocolo http.

On Sun, 2008-05-04 at 21:12 -0700, punchik punchik wrote:
> hola, soy novato en python, he estado tratando de correr varios scripts en mi servidor web pero no me funciona, en todos me sale el mismo error, alguien tiene idea de porque sucede esto? mi servidor es dreamhost y si soporta scripts de python, no entiendo porque no lo reconoce, tendre que activar algo ? alguna idea?.. el error es el siguiente:
> 
> gracias
> 
> 
> 500 internal server error
> Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
> Please contact the server administrator, webmaster en metalex.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
> More information about this error may be available in the server error log.
> Additionally, a 404 Not Found error was encountered 
> 
> 
> 
> 
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
> _______________________________________________
> Lista de correo Python-es 
> http://listas.aditel.org/listinfo/python-es
> FAQ: http://listas.aditel.org/faqpyes
-- 
<--Linux... Because I'm Free-->
Marco Antonio Islas Cruz
"Markuz"
Linux User #280229
markuz en islascruz.org
markuz en unixmexico.org
markuz en linuxpozarica.com
marco.islas en gmail.com
islacruz en yahoo.com
http://www.islascruz.org
http://sourceforge.net/projects/gpkg/
http://www.linuxpozarica.com
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes





Más información sobre la lista de distribución Python-es