Python学习笔记2
来源:互联网 发布:sql查询数据库的大小 编辑:程序博客网 时间:2024/06/16 19:26
Python source code
When a Python file is run directly, the special variable "__name__" is set to "__main__".
There is hello.py file as follows:
import sysdef main(): print 'Hello,', sys.argv[1]if __name__ == '__main__': main()
We can run in the IPyhton:
run hello.py Michael
And the result is:
Hello, Michael
0 0
- python学习笔记2
- python学习笔记(2)
- Python学习笔记(2)
- Python学习笔记【2】
- python学习笔记--2
- python学习笔记2
- Python学习笔记[2]
- python学习笔记--2
- python学习笔记2
- Python 学习笔记 -2
- python 学习笔记2
- python 学习笔记-2
- python 学习笔记2
- python 学习笔记2
- Python学习笔记(2)
- Python学习笔记2
- Python学习笔记2
- Python学习笔记(2)
- 动物这样叫-(2)&(3)
- GIT初步
- 插入排序
- Lua中的元方法__newindex详解
- Storm0.8.1的(mapreduce) Spout/Blot编程实例实例详解
- Python学习笔记2
- 栈的应用-解析算术表达式
- 实现a + b两个整数作和,不能用 '+' 号(人人网)
- 形状类族中的纯虚函数
- ubuntu开启sshd服务
- 京东众筹抽奖算法
- 立体类族共有的抽象类
- 修复受损的linux引导
- hadoop再次搭建总结