User Profile

Collapse

Profile Sidebar

Collapse
bustBuddy
bustBuddy
Last Activity: Mar 12 '08, 02:11 AM
Joined: Mar 11 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Well, this is odd...

    I was trying to run this script on an Ubuntu system. Gutsy 7.10

    I decided to go to a WinXP system and try it with 'type' instead of 'cat'

    The script worked as expected. Well, that system is a dual boot with Kubuntu Feisty Fawn. So I booted into that system and ran the scripts there. (with cat again.) This system gave me the same error as on Ubuntu.

    I have one more...
    See more | Go to post

    Leave a comment:


  • That was a typing mistake. I meant EOFError.

    Are you on a linux or a windows computer?

    I don't know if it would make any difference. But I can't understand how it could be me.
    See more | Go to post

    Leave a comment:


  • bustBuddy
    started a topic int(line) does not give expected results...

    int(line) does not give expected results...

    And it's not me. This is taken verbatim from Mark Lutz's book "Programmin g Python"

    you have data.txt:

    123
    000
    999
    042

    You have adder.py:

    import sys
    sum = 0
    while True:
    try:
    line = raw_input()
    except EORError:
    break
    else:
    sum += int(line)
    print...
    See more | Go to post
No activity results to display
Show More
Working...