2 Run a python script, adding extra directories to the python path.
8 print >>sys
.stderr
, "pythonpath.py -I directory script.py [args...]"
22 path
= sys
.argv
.pop(1)
29 if arg
.startswith('-I'):
30 path
= sys
.argv
.pop(1)[2:]
39 sys
.path
[0:0] = [os
.path
.dirname(script
)] + paths
40 execfile(script
, {'__name__': '__main__', '__file__': script
})