Peter - well caught!<br><br>I've been wondering how that line could have arisen when running a script through the interpreter from the command line! Pasting it into Idle gives exactly that output. It was the leading $ that threw me, I took it as the shell prompt. I think that Camilo was actually typing it into Idle as well.<br>
<br><div class="gmail_quote">On 1 August 2011 10:14, Peter Otten <span dir="ltr"><__<a href="mailto:peter__@web.de">peter__@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Camilo Andres Roca Duarte wrote:<br>
<br>
</div><div class="im">> My name is Camilo Roca, I'm a student and recently installed the 2.7.2<br>
> Python version. The problem is that anytime I try to run a script from the<br>
> Python Shell it returns an error message. I am new using python so I am<br>
> not sure what to do since what I'm typing in the shell is in a<br>
> BegginersTutorial.<br>
><br>
> $ python myfunctions.py<br>
> SyntaxError: invalid syntax<br>
<br>
</div>You shouldn't type the line<br>
<br>
$ python myfunctions.py<br>
<br>
into Idle's "Python Shell" window. The $ is the prompt of Unix shells like<br>
bash. You have to open such a shell and type the command there, without the<br>
leading $.<br>
<br>
If you are on Windows you have to open a "DOS Prompt" or "Command Window".<br>
You can then set the working directory with<br>
<br>
cd some\path<br>
<br>
Of course you have to replace some\path with the path where the file<br>
myfunctions.py is actually stored. Finally you can invoke your script with<br>
<br>
python myfunctions.py<br>
<div><div></div><div class="h5"><br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>