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

  • SEARCH
  • Home
  • 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 7802191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:11:14+00:00 2026-06-02T01:11:14+00:00

I am a little stuck with zed shaw’s exercise 15. Actually I had no

  • 0

I am a little stuck with zed shaw’s exercise 15.
Actually I had no problem with the original program,
but the problem is when I try out the extra credit
where he asks us to use raw input instead of argv.

so, this is the code I used

filename=raw_input("enter filename :")
print "here's your file %r" % filename
txt=open(filename)
print txt.read()

when it asks for filename, I give the path e:\python\ex15_sample.txt
I am getting the following error in
this line –> txt = open(filename)
and it further says
no such file or directory

So, what do I 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-06-02T01:11:16+00:00Added an answer on June 2, 2026 at 1:11 am

    Due to the fact that you are using Windows you could try have to use either a / (forward slash) when entering a filename or use a double backslash for the path-seperator \\.

    To enter your filename you could then try e:/python/ex15_sample.txt or e:\\python\\ex15_sample.txt.

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

Sidebar

Related Questions

Im stuck with this little project in C# but basically my problem is this:
I am a little stuck. I can't figure out a much bigger problem than
I apologize for the subjectiveness of this question, but I am a little stuck
I've been stuck on a little unix command line problem. I have a website
I'm a little stuck with an sql query. I've searched everywhere but to no
I'm a little stuck at the moment. I'm trying to figure out how to
So I'm working on a Black jack program and I'm a little stuck. I'll
I've got a little stuck with a small problem here: I use serialport communications
I am just getting into OOP PHP but have got a little stuck. Basically
I'm a little stuck on trying to figure this one out, I think I

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.