最近我安裝的python-git的包,並試圖按照教程上通過以下鏈接的時候,我發現某些方法缺少...不能按照蟒蛇git的教程
http://packages.python.org/GitPython/0.3.2/tutorial.html#tutorial-label
這裏是走出我解釋的:
>>> from git import *
>>> repo = Repo.init('/home/deostroll/scripts/synchost')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'Repo' has no attribute 'init'
>>> repo = Repo('/home/deostroll/scripts/synchost')
>>> repo.is_dirty()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'bool' object is not callable
>>>
我在看教程的過時版本嗎? – deostroll 2012-07-07 18:12:39