My python program crashes when run in windows CMD, but doesn't crash in IDLE. I have sought the possible reason and i found that those quotation marks are the cause of the crash.
Here is my code:
import time
time.sleep(1)
print('“suspects”')
time.sleep(1)
print('done')
input('finish')
What is the reason for that? Those quotation marks are from internet web pages.
update1: - I didn't know kinds of crash, that is why I ask questions. - crash means that when run in windows console, the cmd window is closed entirly unexpectedly.
update 2: this is the output when opening the console then run the script
when run by double clicking the script it is closed unexpectedly. - when opening the console first then run the scrpit (d:\test.py) it gives me : treaceback (most recent call last): file "D:\test.py", line 4, in print('\u201csuspects\u210d') -- file "C:\pythonn34\lib\encodings\cp720.py", line 21, in encode. --- return codecs.charmap_encode(input,self.errors,encoding_table)[0] -- unicodeEncodeError: 'charmap' codec can't encodez character '\u201c' in position 0: character maps to --- sorry I couldn't copy and paste it from the console