Thread: Slowing output

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0

    Slowing output


    Hi ive written a program from an exercise that accesses a list of words and then prints each word to a line. The list is very long and when I run the program through idle/shell it goes through the list rapidly. Is there a way of slowing down the output of the program(the speed the list is shown) so I can see whether for example, words of a certain length have been removed. Id like the output to be maybe 10 words at a time also, cheers.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    39N 104.28W
    Posts
    158
    Rep Power
    3
    Originally Posted by jpg123
    Hi ive written a program from an exercise that accesses a list of words and then prints each word to a line. The list is very long and when I run the program through idle/shell it goes through the list rapidly. Is there a way of slowing down the output of the program(the speed the list is shown) so I can see whether for example, words of a certain length have been removed. Id like the output to be maybe 10 words at a time also, cheers.
    Break up the output into (pick a number) lines. Say 5 lines at a time:
    Code:
    d,i=5,0
    n=len(<list>)/d
    for i in xrange(n):
        print <list>[i:i+d]
        i+=d
        raw_input("hit Enter to continue")
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0
    cheers, i'll try that.

IMN logo majestic logo threadwatch logo seochat tools logo