enter image description here我在Windows XP中使用Python 3.4.4。当我使用双击它运行.py文件时,它只询问用户名和&然后突然终止命令提示符。所以我看不出最终的结果。这是我的代码:
from datetime import datetime
import time
from os import getcwd
import sys
name = input("Your name please: ")
print("Hello",name,",your system is:",sys.platform)
print("Your current work directory is:",getcwd())
print("Currenttime:",time.strftime("%a"),datetime.today(),time.strftime("%p"))
print("Thanks for trying. \u00a9 Gaz does Python")
input()
有人可以帮帮我吗?我已经尝试了time.sleep()
,但这也行不通。