How does python interpret command line arguments?
<p>Here is a simple snippet of python code</p>

<pre><code>#!/usr/bin/python
import sys
print sys.argv
</code></pre>

<p>Now, if I save this as test.py, make it executable, and run it as</p>

<p><code>./test.py abc</code> it prints <code>['./test.py','abc']</code> which is perfectly sensible.</p>

<p>But if I run it as</p>

<pre><code>./test.py http://www.google.co.in/imgres?hl=en&amp;sa=X&amp;biw=1600&amp;bih=729&amp;tbm=isch&amp;prmd=imvns&amp;tbnid=5FSY1KAB4T48vM:&amp;imgrefurl=http://www.freeganita.com/en/mdlife/4_4.htm&amp;docid=x4Z8mIMpa8FS9M&amp;imgurl=http://www.freeganita.com/en/mdlife/4_4_files/image007.jpg&amp;w=581&amp;h=260&amp;ei=MFaGUMnDHYXSrQfp5YGoDA&amp;zoom=1&amp;iact=hc&amp;vpx=439&amp;vpy=132&amp;dur=1059&amp;hovh=150&amp;hovw=336&amp;tx=71&amp;ty=171&amp;sig=100962344983266552479&amp;page=1&amp;tbnh=123&amp;tbnw=276&amp;start=0&amp;ndsp=28&amp;ved=1t:429,r:2,s:0,i:89
</code></pre>

<p>it prints</p>

<pre><code>[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']
</code></pre>

<p>Can someone explain this?</p>
