python helloworld

2015-10-11 0 656
python   helloworld
#!/usr/bin/env python
# -*- coding: utf-8 -*-

' a test module '

__author__ = 'test'

import sys

def test():
    args = sys.argv
    if len(args)==1:
        print 'Hello, world!'
    elif len(args)==2:
        print 'Hello, %s!' % args[1]
    else:
        print 'Too many arguments!'

if __name__=='__main__':
    test()

遇见资源网 python python helloworld http://www.ox520.com/15817.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务