简体   繁体   English

Python Fire无法正确解析带空格的单个参数

[英]Python Fire doesn't parse single argument with whitespaces correctly

I have a function like this - 我有这样的功能-

def f(arg)
  print(arg)

trying to pass an argument with Python Fire like this - 试图像这样通过Python Fire传递参数-

f hello there

output - 输出-

hello

It worked after enclosing the input within escaped quotes - 在将输入内容括在转义引号中后,它起作用了-

f \"hello there\"

output - 输出-

hello there

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM