Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/04/2012, 03:01
WorldFox
 
Fecha de Ingreso: octubre-2011
Mensajes: 230
Antigüedad: 12 años, 6 meses
Puntos: 75
Errores en mod_python

Saludos, yo para usa Python Server Pages uso mod_python. Lo que ocurre es que por ejemplo solo por faltarme una comilla, me saca este error:

Código:
MOD_PYTHON ERROR

ProcessId:      1594
Interpreter:    '127.0.1.1'

ServerName:     '127.0.1.1'
DocumentRoot:   '/var/www'

URI:            '/compartidos/test.psp'
Location:       None
Directory:      '/var/www/'
Filename:       '/var/www/compartidos/test.psp'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mod_python.psp'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.7/dist-packages/mod_python/psp.py", line 336, in handler
    p = PSP(req)

  File "/usr/lib/python2.7/dist-packages/mod_python/psp.py", line 119, in __init__
    self.load_from_file()

  File "/usr/lib/python2.7/dist-packages/mod_python/psp.py", line 191, in load_from_file
    code = compile(source, filename, "exec")

  File "/var/www/compartidos/test.psp", line 3

    req.write("""<html>
<body>
<h1>""",0); req.write("Hello!) ;req.write("""</h1>

                      
      
                                               ^

SyntaxError: invalid syntax
Mientras que en PHP me saca una sola linea de SyntaxError: invalid syntax en tal línea.

¿Esto no se puede arreglar para que sea como el de PHP?

Saludos, y gracias de antemano.