1. 今天无意中写了个python脚本,其中有导入time包,但报错,之前一直都没有问题的,并且在bash下也没有问题
>>python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "time.py", line 10, in <module>
print time.time()
TypeError: 'module' object is not callable
之后我又重新source $HOME/.profile,还是不行,不知原因出在哪里,bash下到没问题
2.还有一个问题,现在想不起来了......
>>python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "time.py", line 10, in <module>
print time.time()
TypeError: 'module' object is not callable
之后我又重新source $HOME/.profile,还是不行,不知原因出在哪里,bash下到没问题
2.还有一个问题,现在想不起来了......