How to read argument with spaces when running python script?
UPDATE
It looks like my problem is that I am calling a python script through a shell script:
It works:
> python script.py firstParam file\ with\ spaces.txt # or > python script.py firstParam "file with spaces.txt" # script.py import sys print sys.argv
But not when I run it through a script:
myscript.sh:
#!/bin/sh python $@
Fingerprints: ['firstParam', 'file', 'with', 'spaces.txt']
But I want: ['firstParam', 'file with spaces.txt']
source share