sys.argv arguments with spaces

前端 未结 1 752
执笔经年
执笔经年 2021-01-04 13:30

I\'m trying to input folder names as sys.argv arguments, but am having problem with folder names that have spaces, which become multiple variables.

For example, fro

相关标签:
1条回答
  • 2021-01-04 14:01

    Space is the delimiter for command line arguments. You'll be better off not using spaces in your directory and file names if possible. For entering an argument which has space in it you'll have to enclose it in quotes "folder with space".

    Program.py "D:\Users\Erick\Desktop\Folder Name"

    0 讨论(0)
提交回复
热议问题