Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: syntax error message

Thread Tools

Re: syntax error message

Posts: n/a
On 12/07/2012 18:48, John Magness wrote:
> Using Python 3.2.3
> In shell I made a simple program; dog=2,cat=3,cow=dog+cat
> Entered cow and received 5 as answer
> Saved-as in a user folder
> Went to folder and select "edit with shell" for that file
> displayed, clicked save, run and then run module to activate
> program
> got message in box "syntax error" and after I clicked OK the #2 in the
> heading Python 3.2.3 was high-lighted
> in red and the "or" and "for" words were changed to red letters and
> program seems to be text only.
> In other words, I am not able to re-use or change the program
> Help needed.
> John, a beginner

You were entering it in interactive mode. When you saved it as
"" what you actually saved was all of the prompts and the
output, which isn't a valid program (it has lots of other bits mixed in
with it).

If you click File->New Window you will get an empty window into which
you can type your program.

You can just open the file and then edit it to remove the unwanted bits.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incorrect Syntax Near... Error Message Joe ASP .Net 1 11-08-2009 08:43 PM
Syntax error? What syntax error? Assignment fo default values? Mark Richards Perl Misc 3 11-18-2007 05:01 PM
Syntax bug, in 1.8.5? return not (some expr) <-- syntax error vsreturn (not (some expr)) <-- fine Good Night Moon Ruby 9 07-25-2007 04:51 PM
Syntax highligth with textile: Syntax+RedCloth ? gabriele renzi Ruby 2 12-31-2005 02:44 AM
Complier error!! error C2059: syntax error : '(' Balaji C++ 3 12-03-2004 11:19 PM