Re: Weird newbie question

2012-01-26 Thread Matty Sarro
The issue was a version mismatch. When installing python on windows, it installs a shortcut so when you right click, you can edit things in IDLE. I had installed python 3 after installing 2.7, so it apparently changed the extension. As for not showing tracebacks, I couldn't. When I ran the program

Re: Weird newbie question

2012-01-26 Thread Rick Johnson
On Jan 26, 4:05 pm, Matty Sarro wrote: > Here's my code: > > 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) > pri

Re: Weird newbie question

2012-01-26 Thread John Gordon
In Matty Sarro writes: > Hey everyone. I'm running into a funky error as I work through "Learn > Python the Hard Way." What's weird is both idle and the python > interpreter in idle spit out an error about syntax, but when I run the > same script from the command line it works just fine, with n

Re: Weird newbie question

2012-01-26 Thread Ethan Furman
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 li

Re: Weird newbie question

2012-01-26 Thread Steven D'Aprano
On Thu, 26 Jan 2012 17:05:57 -0500, Matty Sarro wrote: > Hey everyone. I'm running into a funky error as I work through "Learn > Python the Hard Way." What's weird is both idle and the python > interpreter in idle spit out an error about syntax, but when I run the > same script from the command li

Re: Weird newbie question

2012-01-26 Thread Andrea Crotti
On 01/26/2012 10:05 PM, Matty Sarro wrote: Hey everyone. I'm running into a funky error as I work through "Learn Python the Hard Way." What's weird is both idle and the python interpreter in idle spit out an error about syntax, but when I run the same script from the command line it works just fi