×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    4

    Python script not working on nokia 6120 classic

    When I try running a simple python script, that I wrote on my pc, it runs the script, but there is a problem in the first line, that requests input. I can type the input in, but when I press ok nothing happens, and the script doesn't proceed.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Python script not working on nokia 6120 classic

    Maybe you should post the code you're using.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    4

    Re: Python script not working on nokia 6120 classic

    Well it works perfectly on the pc, but here is the code:

    ListExercise = []
    ListSets = []
    ListReps = []
    iNum2 = 0
    sExercise = ''

    for iNum in range(0, 9):
    sExercise = raw_input('Enter exercise:') # THIS IS WHERE THE PROGRAM DOESN'T PROCEED ON MY PHONE

    if sExercise == 'Finished':
    break

    iSets = raw_input('Enter number of sets:')
    iReps = raw_input('Enter number of reps:')
    ListExercise.append(sExercise)
    ListSets.append(iSets)
    ListReps.append(iReps)
    iNum2 = iNum2 + 1

    print
    import time
    TupleDate = str
    TupleDate = time.strftime('%a, %d %b %Y')
    FileGym = open('Gym.txt', 'a')
    FileGym.write('' + '\n')
    FileGym.write(str(TupleDate) + '\n')
    FileGym.write('' + '\n')
    FileGym.write('Exercise\tSets\tReps')
    FileGym.write('' + '\n')
    sHeadings = 'Exercise\tSets\tReps'
    print TupleDate
    print
    print sHeadings
    print
    iCount = 0
    print ListExercise[0] + '\t' + ListSets[0] + '\t' + ListReps[0]

    while iCount < iNum:
    iCount = iCount + 1
    if iCount == iNum2:
    break

    print ListExercise[iCount] + '\t' + ListSets[iCount] + '\t' + ListReps[iCount]
    FileGym.write(ListExercise[iCount] + '\t' + ListSets[iCount] + '\t' + ListReps[iCount] + '\n')

    FileGym.close
    raw_input('Press <enter> to exit.')

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Python script not working on nokia 6120 classic

    You have to press button with * and + on it on the phone's keypad (usually in the bottom left corner of the keypad) and select the return symbol (the arrow pointing left, just like on the enter key of a computer keyboard).

    And in the future, please use the code tags when posting code to keep it indented and easier to read. It's the button with the # symbol on it in the post editor.

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    4

    Re: Python script not working on nokia 6120 classic

    Thanks a lot!

Similar Threads

  1. Python S60 Emulator
    By NAYSAMBO in forum Symbian
    Replies: 25
    Last Post: 2009-04-08, 10:22
  2. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  3. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43
  4. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05

Posting Permissions

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