[英]How can I get a FileStorage object from string
I have this string: 我有这个字符串:
str = "FieldStorage('myfile', 'file.exe', 'hello\\n')"
So I would like to know if there is a way to get the FileStogare object from that string 所以我想知道是否有办法从该字符串中获取FileStogare对象
You could. 你可以。 The question is, should you?
问题是,你应该吗?
str = "FieldStorage('myfile', 'file.exe', 'hello\\n')"
obj = eval(str)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.