Code Point
July 31, 2010, 10:56:54 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
Home
Help
Search
Login
Register
Code Point
>
Client Side
>
Python
(Moderator:
Alter Lobo
) >
plzz help..cars_file tutorial
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: plzz help..cars_file tutorial (Read 2259 times)
fuston05
Jr. Member
Karma: 0
Offline
Posts: 14
plzz help..cars_file tutorial
«
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
Posts: 65
Re: plzz help..cars_file tutorial
«
Reply #1 on:
February 06, 2008, 09:08:31 PM »
Delete the line numbers.
Logged
fuston05
Jr. Member
Karma: 0
Offline
Posts: 14
Re: plzz help..cars_file tutorial
«
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
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Announcements
-----------------------------
Client Side
-----------------------------
=> Python
-----------------------------
Server Side
-----------------------------
=> Web Python
=> PHP
-----------------------------
Test
-----------------------------
=> Test
Loading...