Cleaner readme example

This commit is contained in:
Kenneth Reitz
2010-08-02 08:28:04 -04:00
parent 45a0ea7901
commit 6b4b41bba0
5 changed files with 41 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>GistAPI</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/GistAPI/gistapi</path>
</pydev_pathproperty>
</pydev_project>
@@ -0,0 +1,3 @@
#Wed Jun 23 13:47:22 EDT 2010
eclipse.preferences.version=1
encoding//gistapi/gistapi.py=utf-8
+1 -1
View File
@@ -10,7 +10,7 @@ Example Usage
::
from gistapi import *
from gistapi import Gist, Gists
gist = Gist('d4507e882a07ac6f9f92')
gist.description # 'Example Gist for gist.py'
+10 -8
View File
@@ -8,28 +8,28 @@ GistAPI.py -- A Python wrapper for the Gist API
Example usage:
>>> Gist('d4507e882a07ac6f9f92').repo
u'd4507e882a07ac6f9f92'
'd4507e882a07ac6f9f92'
>>> Gist('d4507e882a07ac6f9f92').owner
u'kennethreitz'
'kennethreitz'
>>> Gist('d4507e882a07ac6f9f92').description
u'Example Gist for gist.py'
'Example Gist for gist.py'
>>> Gist('d4507e882a07ac6f9f92').created_at
u'2010/05/16 10:51:15 -0700'
'2010/05/16 10:51:15 -0700'
>>> Gist('d4507e882a07ac6f9f92').public
False
>>> Gist('d4507e882a07ac6f9f92').filenames
[u'exampleEmptyFile', u'exampleFile']
['exampleEmptyFile', 'exampleFile']
>>> Gist('d4507e882a07ac6f9f92').files
{u'exampleFile': 'Example file content.', u'exampleEmptyFile': ''}
{'exampleFile': 'Example file content.', uexampleEmptyFile': ''}
>>> Gists.fetch_by_user('kennethreitz')[-1].description
u'My .bashrc configuration'
'My .bashrc configuration'
"""
@@ -41,7 +41,6 @@ try:
except ImportError:
import json
__all__ = ['Gist', 'Gists']
@@ -126,4 +125,7 @@ class Gists(object):
if __name__ == '__main__':
import doctest
print('hello')
a = 'bob'
doctest.testmod()