Skip to content

Commit

Permalink
Explicitly remove file handle support.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Feb 5, 2016
1 parent 73d290d commit 9ec13de
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion agatedbf/table.py
Expand Up @@ -17,7 +17,8 @@ def from_dbf(cls, path, encoding=None):
Parse a DBF file.
:param path:
Path to an DBF file to load or a file-like object for one.
Path to an DBF file to load. Note that due to limitations of the
dependency you can not pass a file handle. It must be a path.
"""
dbf = DBF(path, load=True, lowernames=True, encoding=encoding, recfactory=recfactory)
table = agate.Table(dbf.records, column_names=dbf.field_names)
Expand Down
10 changes: 8 additions & 2 deletions docs/index.rst
@@ -1,6 +1,6 @@
=====================
===================
agate-dbf |release|
=====================
===================

.. include:: ../README.rst

Expand Down Expand Up @@ -29,6 +29,12 @@ agate-dbf uses a monkey patching pattern to add read for dbf files support to al
Calling :func:`.patch` attaches all the methods of :class:`.TableDBF` to :class:`agate.Table <agate.table.Table>`.

.. code-block:: python
table = agate.Table.from_dbf('examples/test.dbf')
print(table)
===
API
===
Expand Down
2 changes: 1 addition & 1 deletion example.py
Expand Up @@ -7,5 +7,5 @@

table = agate.Table.from_dbf('examples/test.dbf')

table.print_structure()
print(table)
table.print_table()
2 changes: 1 addition & 1 deletion requirements-py2.txt
Expand Up @@ -6,4 +6,4 @@ sphinx_rtd_theme>=0.1.6
wheel>=0.24.0
ordereddict>=1.1
dbfread>=2.0.5
git+git://github.com/onyxfish/agate.git#egg=agate
agate>=1.2.1
2 changes: 1 addition & 1 deletion requirements-py3.txt
Expand Up @@ -4,4 +4,4 @@ Sphinx>=1.2.2
sphinx_rtd_theme>=0.1.6
wheel>=0.24.0
dbfread>=2.0.5
git+git://github.com/onyxfish/agate.git#egg=agate
agate>=1.2.1

0 comments on commit 9ec13de

Please sign in to comment.