刚开始学习python。我的问题是怎么在linux里运行一个py文件 50
4个回答
展开全部
#!/usr/bin/env python
#注意上面这一行必须是第一行顶头写。
# python file example.
# assume we name this file as "hello.py"
# use shell command "chmod +x hello.py" to make this file executable.
# then you are able to run it by typing "./hello.py"
print "Hello this is from python!"
#注意上面这一行必须是第一行顶头写。
# python file example.
# assume we name this file as "hello.py"
# use shell command "chmod +x hello.py" to make this file executable.
# then you are able to run it by typing "./hello.py"
print "Hello this is from python!"
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询