sys.argv: import sys

# -*- coding:gb2312 -*-
#!/usr/bin/python
# Filename: using_sys.py

import sys

print 'The command line arguments are:'
for i in sys.argv:
    print i

print '\n\nThe PYTHONPATH is', sys.path, '\n'
'''
D:\learnProg\python\exercise>python  using_sys.py q w e r ttt
The command line arguments are:
using_sys.py
q
w
e
r
ttt


The PYTHONPATH is ['D:\\learnProg\\python\\exercise', 'C:\\Python27\\...
'''

 

posted @ 2018-01-17 15:35  sky20080101  阅读(86)  评论(0)    收藏  举报