Discuss / Python / 一个小小小问题

一个小小小问题

Topic source

import sys sys.path.append('C:\Users\Administrator\Desktop') import hello test() Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> test() NameError: name 'test' is not defined hello.test() Hello,world! sys.argv ['']# "为什么argv里只有一个空的元素,廖大不是说第一个永远是'hello.py'吗" #

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

你用的是pyshell,不是直接运行py文件

@廖雪峰 廖老师,那是不是import模块的方法,就不可以输出类似 Hello, Michael!这样的结果?

P.S.廖老师有考虑过增加回复提醒功能吗?


  • 1

Reply