Code Point
July 31, 2010, 10:56:54 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: plzz help..cars_file tutorial  (Read 2259 times)
fuston05
Jr. Member
*

Karma: 0
Offline Offline

Posts: 14


« on: February 06, 2008, 05:09:54 PM »

i copied the script and pasted to make sure i made no mistake and it wont run:
   1:cars_file = open('2006_FE_Guide_14-Nov-2005_download.csv', 'rb')
   2:
   3:# i will be our line counter so we know when to pause
   4:i = 0
   5:
   6:print
   7:
   8:for line in cars_file:
   9:
  10:    i = i + 1      # increment i by 1 at each line
  11:
  12:    print line
  13:
  14:    if i == 5:    # change 5 to whatever you think is adequate
  15:
  16:        i = 0      # zero the counter
  17:        print
  18:        raw_input("Hit Enter to continue: ") # wait for the user
  19:        print
  20:
  21:print
  22:cars_file.close()
  23:
i get error meesage line 1:  unexpected indent:    (1:cars_file) with an arrow pointing to the (1)in the line.  i dont get it, i tried different indentions and get same message every time
« Last Edit: February 06, 2008, 05:23:49 PM by fuston05 » Logged
Alter Lobo
Global Moderator
Jr. Member
*****

Karma: 10
Offline Offline

Posts: 65


« Reply #1 on: February 06, 2008, 09:08:31 PM »

Delete the line numbers.
Logged
fuston05
Jr. Member
*

Karma: 0
Offline Offline

Posts: 14


« Reply #2 on: February 07, 2008, 05:18:07 AM »

TY vry much, it worked...sry if that was a dumb Q, im new to software side of computers,
thanx again  Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!