×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    4

    Creating Dynamic Pages with Python

    Hi,

    I am new in this MWS area.

    I was trying to follow the example given in the PDF file (http://mymobilesite.net/files/Mobile...er_Book_en.pdf) under "Nokia Mobile Web Server"

    I have followed the guidelines given in Page 75 under "Creating Dynamic Pages with Python". I tried to run the following code with two files (ht.acl & test.py).

    ######## test.py (From Page 113)

    def handler(req):
    from mod_python import apache
    req.content_type = ’text/html’
    req.write(”<html>Hello World!</html>”)
    return apache.OK

    ######### ht.acl (From Page 113)

    AddHandler mod_python .py
    PythonHandler test
    PythonDebug On
    Options None
    Order Deny,Allow
    Allow from all
    <FilesMatch ”\.(pyc)$”>
    Deny from all
    </FilesMatch>

    I tried to run the test application by requesting the following URL:

    https://testapplication.mymobilesite.net/test/test.py

    I find the following Error message:

    #########
    The website cannot display the page

    HTTP 500
    Most likely causes:
    The website is under maintenance.
    The website has a programming error.

    What you can try:
    Refresh the page.

    Go back to the previous page.

    More information

    This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

    #########

    Any idea how to solve the problem?

  2. #2
    Registered User
    Join Date
    Dec 2003
    Posts
    20

    Re: Creating Dynamic Pages with Python

    Hi.

    I copy/pasted that code from your post and found it also causing the same error. After looking it again with the editor I noticed that the ' and " characters were little different. I changed those to "normal" and then it worked. Try that out, I hope it starts working for you too!

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    4

    Re: Creating Dynamic Pages with Python

    Hi,

    It works for me too

    Thanks a lot - it's a great help and finding! I had no clue.

    Quote Originally Posted by jpusa View Post
    Hi.

    I copy/pasted that code from your post and found it also causing the same error. After looking it again with the editor I noticed that the ' and " characters were little different. I changed those to "normal" and then it worked. Try that out, I hope it starts working for you too!

Similar Threads

  1. Replies: 3
    Last Post: 2009-02-14, 13:37
  2. Replies: 2
    Last Post: 2009-01-26, 07:59
  3. Replies: 5
    Last Post: 2008-10-07, 08:44
  4. Python for S60.Read it once
    By jalpesh_patel17 in forum Symbian
    Replies: 0
    Last Post: 2008-09-08, 05:45
  5. Creating a dynamic list with icon and text.
    By khurshed79 in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-09-08, 13:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •