Python-入门
我刚刚开始使用Python,并编写了一个简单的外围程序。然而,每当我在终端中键入python peripherm.py时,我都会遇到以下错误,我不知道如何解决它Python-入门,python,syntax,syntax-error,Python,Syntax,Syntax Error,我刚刚开始使用Python,并编写了一个简单的外围程序。然而,每当我在终端中键入python peripherm.py时,我都会遇到以下错误,我不知道如何解决它 >>> python perimeter.py File "<stdin>", line 1 python perimeter.py ^ >>python periment.py 文件“”,第1行 python.py ^ SyntaxError:无效语法 那是什么问题?我怎
>>> python perimeter.py
File "<stdin>", line 1
python perimeter.py
^
>>python periment.py
文件“”,第1行
python.py
^
SyntaxError:无效语法
那是什么问题?我怎么修理它
谢谢。您可以在命令shell中键入
python permission.py
来启动python解释器。您不能在Python解释器中键入它
如果确实需要从Python解释器中运行脚本,请执行
execfile('permiture.py')
@teknolagi:如果删除.py
,这可能会在第一次运行,但不会在以后的任何时间运行。没问题。仅供参考,如果这回答了你的问题,你可以通过点击绿色复选标记来接受。啊,哇<代码>导入周长