Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19507
| Date | 2012-01-26 14:19 -0800 |
|---|---|
| From | Ethan Furman <ethan@stoneleaf.us> |
| Subject | Re: Weird newbie question |
| References | <CAHUGJcFyc5wLnC987ApyaXqzHsx9LZTLCLR-aRAinrk1QsyS=w@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5140.1327617309.27778.python-list@python.org> (permalink) |
Matty Sarro wrote:
> from sys import argv
> script,filename=argv
> txt=open(filename)
> print "Here is your file %r:" % filename
> print txt.read()
> print "I'll also ask you to type it again:"
> file_again=raw_input("> ")
> txt_again=open(file_again)
> print txt_again.read()
>
> IDLE is saying that my error is on line 4, at the second set of
> quotation marks.
The code is for Python 2 -- are you using Python 3?
~Ethan~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Weird newbie question Ethan Furman <ethan@stoneleaf.us> - 2012-01-26 14:19 -0800
csiph-web