Apologies for the newbie question.
I'm trying to walk thru a directory tree that is passed on the command line (in Windows), for example:
c:>doit.py "C:\Users\dave\right here"
To debug that in Spyder, I did Run>Configuration... then put "C:\Users\dave\right here" (including the quotes) into the "Command line options" box under General Settings.
If I do:
A = sys.argv[2]
B = 'C:\\Users\\dave\\right here'
os.walk(A)
os.walk(B)
Then only the os.walk(B) works. That seems to be because
A contains "C:\Users\dave\right here" (including the quotes), and
B contains C:\Users\dave\right here
Is there a straightforward way to get rid of the double quotes?
(I'm not sure why, but sys.argv[1] and sys.argv[3] both get populated with empty strings, too.)
BTW - if I leave out the double quotes, then I get:
sys.argv[1] == C:\Users\dave\right
and
sys.argv[2] = here
...so that doesn't work too well. I seem to need the double quotes to avoid the whitespace break.