Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 963997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:45:27+00:00 2026-05-16T01:45:27+00:00

i just installed python i am trying to run this script: import csv reader

  • 0

i just installed python

i am trying to run this script:

import csv
reader = csv.reader(open("some.csv", "rb"))
for row in reader:
    print row

i am running on windows.

  1. do i have to type each line individually into python shell or can i save this code into a text file and then run it from the shell?
  2. where does some.csv have to be in order to run it? in the same c:\python26 folder?
  3. what is this code supposed to do?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:45:28+00:00Added an answer on May 16, 2026 at 1:45 am
    1. You can do both! To run the code from a text file (such as ‘csvread.py’, but the extension doesn’t matter), type: python csvread.py at the command prompt. Make sure your PATH is set to include the Python installation directory.

    2. “some.csv” needs to be in the current directory.

    3. This code opens a Python file descriptor specifically designed to read CSVs. The reader file descriptor then prints out each row of the CSV in order. Check the documentation out for a more detailed example: http://docs.python.org/library/csv.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Escape it with another %: $stringWithVariables = 'About to deduct… May 16, 2026 at 5:15 pm
  • Editorial Team
    Editorial Team added an answer I have an idea after a while: You can pin… May 16, 2026 at 5:15 pm
  • Editorial Team
    Editorial Team added an answer Ok so I went through the wiki and saw that… May 16, 2026 at 5:15 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am running Python 2.7 under Mac OS 10.6.4, and I just installed wxPython
I am trying to use 'py2app' to generate a standalone application from some Python
I am trying to get PIL working with Django 1.2.1 and Python 2.7 on
I installed both Python 2.7 and Python 2.6.5. I don't know what went wrong,
I have virtualenv and virtualenvwrapper installed on a shared Linux server with default settings
I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying
First things first, I am a Python beginner, with a typical C++/Java background for
I'm still a complete beginner in the field of web development and I'm trying
I can't get the Ruby interpreter to run on either of my Macs (one
I'm trying to get Google AppEngine to work on my Debian box and am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.