Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread Steve Holden
Steve Holden wrote: > oscartheduck wrote: [...] >> > Yes. SyntaxError is raised when the interpreter is compiling the Python > into byetcodes ready for execution. This *can* happen at run time, but > usually it's when you are importing a module and so it gets > transmogrified into an ImportError

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread oscartheduck
Wow. Thanks, everyone, for the responses. It helps a lot having such a well informed and helpful resource. -- http://mail.python.org/mailman/listinfo/python-list

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread Jerry Hill
On 4 Apr 2007 10:38:24 -0700, oscartheduck <[EMAIL PROTECTED]> wrote: > I have a small script for doing some ssh stuff for me. I could have > written it as shell script, but wanted to improve my python skills > some. > > RIght now, I'm not catching a syntax error as I'd like to. ... > port = input(

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread skip
(Are you Howard the Duck's lesser known cousin?) > "oscar" == oscartheduck <[EMAIL PROTECTED]> writes: oscar> I have a small script for doing some ssh stuff for me. I could oscar> have written it as shell script, but wanted to improve my python oscar> skills some. oscar> RIg

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread Steve Holden
oscartheduck wrote: > I have a small script for doing some ssh stuff for me. I could have > written it as shell script, but wanted to improve my python skills > some. > > RIght now, I'm not catching a syntax error as I'd like to. > > Here's my code: > > #!/usr/bin/env python > import sys > impor

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread Terry Reedy
"oscartheduck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I have a small script for doing some ssh stuff for me. I could have | written it as shell script, but wanted to improve my python skills | some. | | RIght now, I'm not catching a syntax error as I'd like to. | | Here's my

Re: try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread kyosohma
On Apr 4, 12:38 pm, "oscartheduck" <[EMAIL PROTECTED]> wrote: > I have a small script for doing some ssh stuff for me. I could have > written it as shell script, but wanted to improve my python skills > some. > > RIght now, I'm not catching a syntax error as I'd like to. > > Here's my code: > > #!/

try... except SyntaxError: unexpected EOF while parsing

2007-04-04 Thread oscartheduck
I have a small script for doing some ssh stuff for me. I could have written it as shell script, but wanted to improve my python skills some. RIght now, I'm not catching a syntax error as I'd like to. Here's my code: #!/usr/bin/env python import sys import os port = input("Please enter a port to