0
我測試出來蟒蛇詛咒模塊和試圖一個簡單的腳本我遇到這個錯誤:詛咒在Python2.7.10/3.4.3 addstr()錯誤
NameError: global name 'addstr' is not defined
這裏是我的代碼:
#!/usr/bin/env python
import curses, sys
from curses import *
def main():
stdscr = initscr()
addstr("Hello")
endwin()
if __name__ == "__main__":
main()
我不知道我做了什麼新手的錯誤,我遵循python的curses指南。 在此先感謝。
哇,我是一個真正的假人!我想我沒有注意......謝謝! – Dindan