Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2008
    United States

    Indentation Error


    I m using this code, but emulator gives me error at line no 10.
    Please help.

    import appuifw, httplib, urllib, e32

    def send_data(): #function to send the data upto the server.
    d = appuifw.query(u"input:", "text")
    if dep == None: # if no data is inputted
    test1 = (u"...")
    else: # else data is ready for upload
    test1 = (u""+d)

    params = urllib.urlencode({'data': test1, 'eggs': 0, 'bacon': 0})
    10 headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
    conn = httplib.HTTPConnection("www.mobapps.org")
    conn.request("POST", "/courses/pys60/set_txt.php", params, headers)
    appuifw.note(u"Data sent", "info")

    def quit(): #exit function

    appuifw.app.menu = [(u"send data", send_data)]

    appuifw.app.exit_key_handler = quit
    script_lock = e32.Ao_lock()

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Ahmedabad, Gujarat, India

    Re: Indentation Error

    first of all welcome to the forum nokia discussion boards
    indentatitions are of very much important in python what you shoould do is enter two backspaces at the 10th line so it is vertically syncronized with all other lines.
    Moreover when you are posting ant code in the forum nokia discussion boards please use the code tags provided.

    EDIT:My apologies for the mistake now i have corrected the error in my website have a look there and if you have any query related to python post it at the python dibo.
    Last edited by gaba88; 2008-08-05 at 05:06.

Similar Threads

  1. XMl Parser Implementation for Symbian
    By ittiam in forum Symbian
    Replies: 26
    Last Post: 2009-09-16, 05:26
  2. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  3. Help with lnk2019 lnk1120 error
    By yuenfatt in forum Symbian
    Replies: 8
    Last Post: 2007-08-24, 08:21
  4. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30
  5. User break point error in Grid
    By ag24master in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-08-07, 08:20

Posting Permissions

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