Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

question on Python CGI

andohungandohung Posts: 23Member
im trying to write a messageboard using python
i have some difficulties with linking the to the messages

say there is a link on the message title, how do I allocate the message content with that link???

I saw other people use address like this:
http://www.xxx.com/msgboards/msg.cgi?board=news&view=4i8hheyj

where i guess the "4i8hheyj" is the message id for the script to locate the message content

how do i use Python to manipulate the bunch of information after the address .../msg.cgi? (?board=news&view=4i8hheyj)

anyone help pls???

Comments

  • infidelinfidel Posts: 2,900Member
    : im trying to write a messageboard using python
    : i have some difficulties with linking the to the messages
    :
    : say there is a link on the message title, how do I allocate the message content with that link???
    :
    : I saw other people use address like this:
    : http://www.xxx.com/msgboards/msg.cgi?board=news&view=4i8hheyj
    :
    : where i guess the "4i8hheyj" is the message id for the script to locate the message content
    :
    : how do i use Python to manipulate the bunch of information after the address .../msg.cgi? (?board=news&view=4i8hheyj)

    Try writing a script like this:

    [code]
    #!/usr/bin/python

    import cgi

    form = cgi.FieldStorage()

    print "Content-type: text/html
    "

    cgi.print_form(form)
    [/code]

    It should give you some hints. Also check the documentation on the cgi module.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

  • infidelinfidel Posts: 2,900Member
    Check the messages further down on this board. DJ and I were working on an event calendar cgi script a while back. Haven't heard from him in a while, but our progress is here for you to see.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

Sign In or Register to comment.