can you share the first line of your shell (shabang) ?<div><br></div><div>I think you have forgotten to tell the shell which interpreter to use</div><div><br></div><div>if you have not put #!/usr/bin/python then its plain shell script which is incorrect </div>
<div><br></div><div> <br><div><br><div class="gmail_quote">On Thu, Feb 17, 2011 at 1:57 PM, Werner <span dir="ltr"><<a href="mailto:wdahn@netfront.net">wdahn@netfront.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have a trivially simple piece of code called timewaster.py:<br>
____________________________________________________<br>
<br>
while True:<br>
i = 0<br>
for i in range(10):<br>
break<br>
_____________________________________________________<br>
<br>
It runs fine with Eric but when I try to run it from shell...<br>
> ./timewaster.py<br>
./timewaster.py: line 4: syntax error near unexpected token `('<br>
./timewaster.py: line 4: ` for i in range(10):'<br>
<br>
I've tried this on openSuse 11.3 and Kubuntu 10.04, both use Python<br>
version 2.6.5, both show the above.<br>
<br>
Before I tear out my hair any more (only 3 left) I thought I'd ask here<br>
what I am doing wrong.<br>
<br>
Best Regards<br>
Werner Dahn<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Nitin Pawar<br><br>
</div></div>