- 规划文件目录:
/me/old/2
/me/solo/control
等等
- 创建文档.py,要有解释器和utf-8编码,如:
1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import getpass 4 a=getpass.getpass("Enter a number: ") 5 b=getpass.getpass("Enter another number: ") 6 def add_num(x,y): 7 print(a) 8 print(b) 9 total=float(x)+float(y) 10 return total 11 print("This won't be printed") 12 print("The sum is: "+str(add_num(a,b))) 13 14 def max_num(x,y): 15 if x>=y : 16 return(x) 17 else: 18 return(y) 19 print("The max is: "+str(max_num(a,b)))
- 执行代码:
登录centos,执行代码(包括路径)
./me/solo/function/return.py
- 调试