Код: Выделить всё
def hello(a,b):
print "hello and that's your sum:"
sum=a+b
print sum
import sys
if __name__ == "__main__":
hello(sys.argv[2])
Код: Выделить всё
C:\Python27>hello 1 1
Подробнее здесь: https://stackoverflow.com/questions/175 ... mmand-line
Мобильная версия