开发者

Executing / Running a python script from ubuntu server

Can anybody help me how to run a python script through command line?

My python script http://buffis.com/2007/07/25/getting-info_ha开发者_JAVA百科sh-for-xbt-tracker/comment-page-1/

I am using this command /var/www/hash_info.py /var/www/Muha_Album.7912.torrent

I have copied dependency file bencode.py mentioned in article link above. When I execute the above command I get error No such file or directory but when i chmod the file to 644 it says Permission denied the file is present at the location.

I have installed pythong using this command apt-get install python-gtk2 python-glade2


python /var/www/hash_info.py /var/www/Muha_Album.7912.torrent


Maybe it says:

bad interpreter: No such file or directory

Then, the first line, so called shebang line is the issue here. I guess you need to change it to where your python is really installed. On my Ubuntu installation it's /usr/bin/python.

Also, the solution from voyager should work for you as well.


Try chmod 744

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜