diff --git a/doc/introduction.rst b/doc/introduction.rst index 296aa879..320e769f 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -24,7 +24,7 @@ First create a Github instance:: Then play with your Github objects:: for repo in g.get_user().get_repos(): - print repo.name + print(repo.name) repo.edit(has_wiki=False) Download and install diff --git a/github/PaginatedList.py b/github/PaginatedList.py index 04d5712c..2e5eaccb 100644 --- a/github/PaginatedList.py +++ b/github/PaginatedList.py @@ -89,7 +89,7 @@ class PaginatedList(PaginatedListBase): You can simply enumerate through instances of this class:: for repo in user.get_repos(): - print repo.name + print(repo.name) You can also index them or take slices:: @@ -99,7 +99,7 @@ class PaginatedList(PaginatedListBase): If you want to iterate in reversed order, just do:: for repo in user.get_repos().reversed: - print repo.name + print(repo.name) And if you really need it, you can explicitely access a specific page:: diff --git a/setup.py b/setup.py index cfb5a8ed..ad642476 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ if __name__ == "__main__": description="Use the full Github API v3", author="Vincent Jacques", author_email="vincent@vincent-jacques.net", - url="http://pygithub.github.io/PyGithub/v1/index.html", + url="http://pygithub.readthedocs.io/en/latest/", long_description=textwrap.dedent("""\ (Very short) Tutorial ===================== @@ -46,27 +46,23 @@ if __name__ == "__main__": First create a Github instance:: from github import Github - + + # using username and password g = Github("user", "password") - + + # or using an access token + g = Github("access_token") + Then play with your Github objects:: - + for repo in g.get_user().get_repos(): - print repo.name + print(repo.name) repo.edit(has_wiki=False) - You can also create a Github instance with an OAuth token:: - - g = Github(token) - - Or without authentication:: - - g = Github() - Reference documentation ======================= - See http://pygithub.github.io/PyGithub/v1/index.html"""), + See http://pygithub.readthedocs.io/en/latest/"""), packages=[ "github", "github.tests",