这是一个简单的python代码片段
#!/usr/bin/python
import sys
print sys.argv
现在,如果我将它保存为 test.py,使其可执行,然后运行它
./test.py abc
它打印出来['./test.py','abc']
是非常明智的。
但是如果我运行它
./test.py http://www.google.co.in/imgres?hl=en&sa=X&biw=1600&bih=729&tbm=isch&prmd=imvns&tbnid=5FSY1KAB4T48vM:&imgrefurl=http://www.freeganita.com/en/mdlife/4_4.htm&docid=x4Z8mIMpa8FS9M&imgurl=http://www.freeganita.com/en/mdlife/4_4_files/image007.jpg&w=581&h=260&ei=MFaGUMnDHYXSrQfp5YGoDA&zoom=1&iact=hc&vpx=439&vpy=132&dur=1059&hovh=150&hovw=336&tx=71&ty=171&sig=100962344983266552479&page=1&tbnh=123&tbnw=276&start=0&ndsp=28&ved=1t:429,r:2,s:0,i:89
它打印
[1] 14812
[2] 14813
[3] 14814
[4] 14815
[5] 14816
[6] 14817
[7] 14818
[8] 14819
[9] 14820
[10] 14821
[11] 14822
[12] 14823
[13] 14824
[14] 14825
[15] 14826
[16] 14827
[17] 14828
[18] 14829
[19] 14830
[20] 14831
[21] 14832
[22] 14833
[23] 14834
[24] 14835
[25] 14836
[26] 14837
[27] 14838
[28] 14839
[2] Done sa=X
[3] Done biw=1600
[4] Done bih=729
[5] Done tbm=isch
[6] Done prmd=imvns
[7] Done tbnid=5FSY1KAB4T48vM:
[8] Done imgrefurl=http://www.freeganita.com/en/mdlife/4_4.htm
[9] Done docid=x4Z8mIMpa8FS9M
[10] Done imgurl=http://www.freeganita.com/en/mdlife/4_4_files/image007.jpg
[11] Done w=581
[15] Done iact=hc
[18] Done dur=1059
[20] Done hovw=336
[21] Done tx=71
[22] Done ty=171
[24] Done page=1
[25] Done tbnh=123
jpm@andromeda:~/test$ ['./test.py', 'http://www.google.co.in/imgres?hl=en']
有人可以解释一下吗?