<div dir="ltr">On Mon, Aug 25, 2008 at 3:48 PM, Gopal Ghosh <span dir="ltr">&lt;<a href="mailto:gopalmessages@gmail.com">gopalmessages@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I created a script – myscript.py and saved it at c:\myscript.py<br>
*******<br>
myscript.py contains the following commands<br>
a=1000<br>
2**8<br>
print &#39;hello world&#39;<br>
raw_input( ) # what this command does???<br>
******<br>
now I tried to call the script from<br>
IDLE<br>
&gt;&gt;&gt;myscript.py<br>
(not working from IDLE) got the error<br>
Traceback (most recent call last):<br>
 &nbsp;File &quot;&lt;pyshell#30&gt;&quot;, line 1, in &lt;module&gt;<br>
 &nbsp; &nbsp;power.py<br>
NameError: name &#39;power&#39; is not defined<br>
RUN<br>
c:\myscript.py<br>
(working from RUN)<br>
Python CLI – called by typing python at run prompt<br>
&gt;&gt;&gt;myscript.py<br>
&nbsp;(not working from Python CLI) again got the same error as in IDLE<br>
******************************************************<br>
now I tried to run the script in a different way<br>
IDLE<br>
&gt;&gt;&gt;myscript.py &gt; saveit.txt<br>
(not working from IDLE) got the following error<br>
Traceback (most recent call last):<br>
 &nbsp;File &quot;&lt;pyshell#29&gt;&quot;, line 1, in &lt;module&gt;<br>
 &nbsp; &nbsp;power.py &gt; saveit.txt<br>
NameError: name &#39;power&#39; is not defined<br>
RUN<br>
c:\myscript.py<br>
(working from RUN – but don&#39;t know where to locate saveit.txt)<br>
Python CLI – called by typing python at run prompt<br>
&gt;&gt;&gt;myscript.py<br>
&nbsp;(not working from Python CLI) got the same eror as in IDLE<br>
******************************************************<br>
_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</blockquote></div><br>Hi<br>
I think you are using an older version of python which doesn&#39;t support
the exponential operation (2**8). The code provided by you work in my
python prompt.<br>
<br>
raw_input() takes a raw string as input from the console. more info at <a href="http://docs.python.org/lib/built-in-funcs.html#l2h-59">http://docs.python.org/lib/built-in-funcs.html#l2h-59</a><br>
<br>
Cheers<br clear="all"><br>-- <br>Abhinav Sarkar<br>Fair Isaac India<br><br>Mobile:+91-9731596137<br>Office: +91-8041371605<br><br>Web: <a href="http://claimid.com/abhin4v">http://claimid.com/abhin4v</a><br>Twitter: <a href="http://twitter.com/abhin4v">http://twitter.com/abhin4v</a><br>
---------<br>The world is a book, those who do not travel read only one page.<br>
</div>