<br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 12:31 PM, vince spicer <span dir="ltr">&lt;<a href="mailto:vinces1979@gmail.com">vinces1979@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Oct 21, 2009 at 12:21 PM, Jason Willis <span dir="ltr">&lt;<a href="mailto:chaoticslacker@gmail.com" target="_blank">chaoticslacker@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
hi everyone, <br><br>sorry for the rather boring question but i&#39;m having serious issues getting my programs to run from the command line without having to type &quot;python&quot; in-front of them. I&#39;ve tried a lot of different variations on the #!/usr/bin/ etc. line and have come up with the following every time:<br>


<br><b><span style="font-weight: normal;">[root@localhost moonshinerat]# mycode.py</span><br style="font-weight: normal;"><span style="font-weight: normal;">
bash: mycode.py: command not found</span><br style="font-weight: normal;"><span style="font-weight: normal;">
[root@localhost moonshinerat]# mycode</span><br style="font-weight: normal;"><span style="font-weight: normal;">
bash: mycode: command not found</span><br style="font-weight: normal;"><span style="font-weight: normal;">
[root@localhost moonshinerat]#</span><br><br><span style="font-weight: normal;">I&#39;ve chmod&#39;ed the program and everything but i still get command not found from the shell. The only thing that does work is ./mycode.py but from what i understand that&#39;s been built into linux itself to work that way... <br>


<br>please someone let me know what i&#39;m doing wrong here and possibly help?? <br><br>thanks!<br></span><br></b>
<br></div></div>_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br>try:<br><br>./mycode.py<br><br>since i&#39;m guess your current path isn&#39;t in the system path<br><font color="#888888"><br>Vince<br><br>
</font></blockquote></div><br>Sorry didn&#39;t read full post,<br><br>you would have add your program directory to the system path in order to call the program by name<br><br>you can add this to you bashrc<br><br>export PATH=~/my/program/dir:&quot;${PATH}&quot;<br>
<br><br>Vince<br>