Python 3.x 在Python3.4开发标准库中使用升华文本2不’;行不通

Python 3.x 在Python3.4开发标准库中使用升华文本2不’;行不通,python-3.x,sublimetext2,Python 3.x,Sublimetext2,为什么Python 3.4标准库不能在升华文本中工作? 在SublimateText中的神话.py中运行(马克·卢茨书中的示例): import math math.pi math.sqrt(9) 得到 Traceback (most recent call last): File "/Users/*myusername*/Desktop/python/math.py", line 1, in <module> import math File "/Users/*m

为什么Python 3.4标准库不能在升华文本中工作?
在SublimateText中的神话.py中运行(马克·卢茨书中的示例):

import math
math.pi
math.sqrt(9)
得到

Traceback (most recent call last):
  File "/Users/*myusername*/Desktop/python/math.py", line 1, in <module>
    import math
  File "/Users/*myusername*/Desktop/python/math.py", line 2, in <module>
    math.pi
AttributeError: 'module' object has no attribute ‘pi'
回溯(最近一次呼叫最后一次):
文件“/Users/*myusername*/Desktop/python/math.py”,第1行,在
输入数学
文件“/Users/*myusername*/Desktop/python/math.py”,第2行,在
数学圆周率
AttributeError:“模块”对象没有属性“pi”

在终端或EDLE中执行此操作,所有工作正常

尝试将文件重命名为
math.py
之外的文件。您正在尝试导入
math
模块,Python正在阻塞,因为它正在尝试导入自身,并且没有定义
pi()
函数。如果您将文件名更改为类似于
py34\u math\u test.py
的文件名,您应该已经设置好了。

在Python.sublime-build
{cmd:[“python3”、“-u”、“$file”]、“file\u regex:“^[]*file\”(…*?)\”,行([0-9]*),“选择器”:“source.Python”,“编码”:“utf8”,“路径”:“/Library/Frameworks/Python.framework/Versions/3.4/bin/«}