Weird newbie question

Ethan Furman ethan at stoneleaf.us
Thu Jan 26 17:19:43 EST 2012


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~



More information about the Python-list mailing list