Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python 2.7.17嵌入的输入错误'\0';输入行中_Python_Python 2.7 - Fatal编程技术网

python 2.7.17嵌入的输入错误'\0';输入行中

python 2.7.17嵌入的输入错误'\0';输入行中,python,python-2.7,Python,Python 2.7,我试图输入一些内容,但它显示了以下错误: 在输入行中嵌入“\0” 当我尝试时: klm=raw_input("enter your name") 有一个错误: enter your nameMZ� �� � @ � � �!�L�! This program cannot be run in DOS mode 您正在正确地运行解释器。?不要在Python2中使用input。这对您的应用程序来

我试图输入一些内容,但它显示了以下错误:

在输入行中嵌入“\0”

当我尝试时:

klm=raw_input("enter your name") 
有一个错误:

enter your nameMZ�       ��  �       @                                     � �  �!�L�!
This program cannot be run in DOS mode

您正在正确地运行解释器。?不要在Python2中使用
input
。这对您的应用程序来说是一个巨大的安全漏洞(在后台它会执行
eval
,我们都知道这可能会做什么)。在Python2中使用
raw\u input
input
时输入的内容与Python3中的
input
不同。尝试
raw\u输入
1。请发布完整的错误消息,包括堆栈跟踪。2.请让我们确切地知道您在何处运行此程序,以及如何提供python 2.7.17提供的pycharm 2019.2上的输入
enter your nameMZ�       ��  �       @                                     � �  �!�L�!
This program cannot be run in DOS mode