How To/python/

# -*- coding: utf-8 -*-
 
"""
List of arguments passed to python interpreter. 
At index 0 you will find python script filename.
"""
 
 
#file: test.py
import sys
print sys.argv 
 
$python test.py arg1 arg2
#['test.py','arg1','arg2']