Browse Source

HUE-207 [core] upgrade tablib to development version

Abraham Elmahrek 11 years ago
parent
commit
1a2de1bc35
100 changed files with 827 additions and 314 deletions
  1. 1 1
      apps/beeswax/src/beeswax/conf.py
  2. 1 1
      apps/beeswax/src/beeswax/tests.py
  3. 1 0
      desktop/conf.dist/hue.ini
  4. 1 0
      desktop/conf/pseudo-distributed.ini.tmpl
  5. 0 175
      desktop/core/ext-py/tablib-0.9.11/NOTICE
  6. 0 11
      desktop/core/ext-py/tablib-0.9.11/tox.ini
  7. 4 1
      desktop/core/ext-py/tablib-develop/.gitignore
  8. 8 0
      desktop/core/ext-py/tablib-develop/.travis.yml
  9. 6 1
      desktop/core/ext-py/tablib-develop/AUTHORS
  10. 0 0
      desktop/core/ext-py/tablib-develop/HACKING
  11. 5 1
      desktop/core/ext-py/tablib-develop/HISTORY.rst
  12. 0 0
      desktop/core/ext-py/tablib-develop/LICENSE
  13. 0 0
      desktop/core/ext-py/tablib-develop/MANIFEST.in
  14. 459 0
      desktop/core/ext-py/tablib-develop/NOTICE
  15. 3 2
      desktop/core/ext-py/tablib-develop/README.rst
  16. 0 0
      desktop/core/ext-py/tablib-develop/TODO.rst
  17. 0 0
      desktop/core/ext-py/tablib-develop/docs/Makefile
  18. 0 0
      desktop/core/ext-py/tablib-develop/docs/__init__.py
  19. 2 2
      desktop/core/ext-py/tablib-develop/docs/_templates/sidebarintro.html
  20. 1 1
      desktop/core/ext-py/tablib-develop/docs/_templates/sidebarlogo.html
  21. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/.gitignore
  22. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/LICENSE
  23. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/README.rst
  24. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/flask_theme_support.py
  25. 6 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr/layout.html
  26. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr/relations.html
  27. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr/static/flasky.css_t
  28. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr/static/small_flask.css
  29. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr/theme.conf
  30. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/layout.html
  31. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/static/flasky.css_t
  32. 0 0
      desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/theme.conf
  33. 0 0
      desktop/core/ext-py/tablib-develop/docs/api.rst
  34. 0 0
      desktop/core/ext-py/tablib-develop/docs/conf.py
  35. 11 16
      desktop/core/ext-py/tablib-develop/docs/development.rst
  36. 3 3
      desktop/core/ext-py/tablib-develop/docs/index.rst
  37. 5 5
      desktop/core/ext-py/tablib-develop/docs/install.rst
  38. 0 0
      desktop/core/ext-py/tablib-develop/docs/intro.rst
  39. 0 0
      desktop/core/ext-py/tablib-develop/docs/krstyle.sty
  40. 10 3
      desktop/core/ext-py/tablib-develop/docs/tutorial.rst
  41. 26 12
      desktop/core/ext-py/tablib-develop/setup.py
  42. 1 1
      desktop/core/ext-py/tablib-develop/tablib/__init__.py
  43. 5 1
      desktop/core/ext-py/tablib-develop/tablib/compat.py
  44. 120 41
      desktop/core/ext-py/tablib-develop/tablib/core.py
  45. 0 0
      desktop/core/ext-py/tablib-develop/tablib/formats/__init__.py
  46. 4 4
      desktop/core/ext-py/tablib-develop/tablib/formats/_csv.py
  47. 11 4
      desktop/core/ext-py/tablib-develop/tablib/formats/_html.py
  48. 1 1
      desktop/core/ext-py/tablib-develop/tablib/formats/_json.py
  49. 1 1
      desktop/core/ext-py/tablib-develop/tablib/formats/_ods.py
  50. 4 4
      desktop/core/ext-py/tablib-develop/tablib/formats/_tsv.py
  51. 58 5
      desktop/core/ext-py/tablib-develop/tablib/formats/_xls.py
  52. 55 4
      desktop/core/ext-py/tablib-develop/tablib/formats/_xlsx.py
  53. 8 7
      desktop/core/ext-py/tablib-develop/tablib/formats/_yaml.py
  54. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/__init__.py
  55. 6 6
      desktop/core/ext-py/tablib-develop/tablib/packages/markup.py
  56. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/markup3.py
  57. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/__init__.py
  58. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/anim.py
  59. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/attrconverters.py
  60. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/chart.py
  61. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/config.py
  62. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/dc.py
  63. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/dr3d.py
  64. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/draw.py
  65. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/easyliststyle.py
  66. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/element.py
  67. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/elementtypes.py
  68. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/form.py
  69. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/grammar.py
  70. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/load.py
  71. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/manifest.py
  72. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/math.py
  73. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/meta.py
  74. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/namespaces.py
  75. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/number.py
  76. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/odf2moinmoin.py
  77. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/odf2xhtml.py
  78. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/odfmanifest.py
  79. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/office.py
  80. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/opendocument.py
  81. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/presentation.py
  82. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/script.py
  83. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/style.py
  84. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/svg.py
  85. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/table.py
  86. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/teletype.py
  87. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/text.py
  88. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/thumbnail.py
  89. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/userfield.py
  90. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf/xforms.py
  91. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/__init__.py
  92. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/anim.py
  93. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/attrconverters.py
  94. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/chart.py
  95. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/config.py
  96. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/dc.py
  97. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/dr3d.py
  98. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/draw.py
  99. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/easyliststyle.py
  100. 0 0
      desktop/core/ext-py/tablib-develop/tablib/packages/odf3/element.py

+ 1 - 1
apps/beeswax/src/beeswax/conf.py

@@ -69,7 +69,7 @@ DOWNLOAD_ROW_LIMIT = Config(
   key='download_row_limit',
   default=1000000,
   type=int,
-  help=_t('A limit to the number of rows that can be downloaded from a query. A value of -1 means there will be no limit.'))
+  help=_t('A limit to the number of rows that can be downloaded from a query. A value of -1 means there will be no limit. A maximum of 65,000 is applied to XLS downloads.'))
 
 SSL = ConfigSection(
   key='ssl',

+ 1 - 1
apps/beeswax/src/beeswax/tests.py

@@ -572,7 +572,7 @@ for x in sys.stdin:
     query = hql_query(hql)
     handle = self.db.execute_and_wait(query)
     csv_resp = download(handle, 'csv', self.db)
-    assert_equal(csv_resp.content, dataset.csv)
+    assert_equal(csv_resp.content.replace('.0', ''), dataset.csv.replace('.0', ''))
 
   def test_designs(self):
     cli = self.client

+ 1 - 0
desktop/conf.dist/hue.ini

@@ -591,6 +591,7 @@
 
   # A limit to the number of rows that can be downloaded from a query.
   # A value of -1 means there will be no limit.
+  # A maximum of 65,000 is applied to XLS downloads.
   ## download_row_limit=1000000
 
   [[ssl]]

+ 1 - 0
desktop/conf/pseudo-distributed.ini.tmpl

@@ -633,6 +633,7 @@
 
   # A limit to the number of rows that can be downloaded from a query.
   # A value of -1 means there will be no limit.
+  # A maximum of 65,000 is applied to XLS downloads.
   ## download_row_limit=1000000
 
   [[ssl]]

+ 0 - 175
desktop/core/ext-py/tablib-0.9.11/NOTICE

@@ -1,175 +0,0 @@
-Tablib includes some vendorized python libraries: ordereddict, pyyaml,
-simplejson, unicodecsv, and xlwt.
-
-Markup License
-==============
-
-Markup is in the public domain.
-
-
-
-OrderedDict License
-===================
-
-Copyright (c) 2009 Raymond Hettinger
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation files
-(the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software,
-and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-    OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-PyYAML License
-==============
-
-Copyright (c) 2006 Kirill Simonov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-
-UnicodeCSV License
-==================
-
-Copyright 2010 Jeremy Dunck. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice, this list of
-      conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright notice, this list
-      of conditions and the following disclaimer in the documentation and/or other materials
-      provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY JEREMY DUNCK ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEREMY DUNCK OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The views and conclusions contained in the software and documentation are those of the
-authors and should not be interpreted as representing official policies, either expressed
-or implied, of Jeremy Dunck.
-
-
-
-
-XLWT License
-============
-
-Portions copyright © 2007, Stephen John Machin, Lingfo Pty Ltd
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. None of the names of Stephen John Machin, Lingfo Pty Ltd and any
-contributors may be used to endorse or promote products derived from this
-software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-"""
-
-"""
-  Copyright (C) 2005 Roman V. Kiseliov
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-  3. All advertising materials mentioning features or use of this
-     software must display the following acknowledgment:
-     "This product includes software developed by
-      Roman V. Kiseliov <roman@kiseliov.ru>."
-
-  4. Redistributions of any form whatsoever must retain the following
-     acknowledgment:
-     "This product includes software developed by
-      Roman V. Kiseliov <roman@kiseliov.ru>."
-
-  THIS SOFTWARE IS PROVIDED BY Roman V. Kiseliov ``AS IS'' AND ANY
-  EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL Roman V. Kiseliov OR
-  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-  OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Roman V. Kiseliov
-Russia
-Kursk
-Libknecht St., 4
-
-+7(0712)56-09-83
-
-<roman@kiseliov.ru>
-Subject: pyExcelerator

+ 0 - 11
desktop/core/ext-py/tablib-0.9.11/tox.ini

@@ -1,11 +0,0 @@
-[tox]
-envlist = py25,py26,py27,py3
-
-[testenv]
-commands=py.test --junitxml=junit-{envname}.xml
-deps = pytest
-
-
-[testenv:py3]
-basepython=/usr/bin/python3
-simplejson = pytest

+ 4 - 1
desktop/core/ext-py/tablib-0.9.11/.gitignore → desktop/core/ext-py/tablib-develop/.gitignore

@@ -22,4 +22,7 @@ coverage.xml
 nosetests.xml
 junit-py25.xml
 junit-py26.xml
-junit-py27.xml
+junit-py27.xml
+
+# tox noise
+.tox

+ 8 - 0
desktop/core/ext-py/tablib-develop/.travis.yml

@@ -0,0 +1,8 @@
+language: python
+python:
+  - 2.6
+  - 2.7
+  - 3.2
+install:
+  - python setup.py install
+script: python test_tablib.py

+ 6 - 1
desktop/core/ext-py/tablib-0.9.11/AUTHORS → desktop/core/ext-py/tablib-develop/AUTHORS

@@ -16,4 +16,9 @@ Patches and Suggestions
 - Benjamin Wohlwend
 - Erik Youngren
 - Mark Rogers
-- Mark Walling
+- Mark Walling
+- Mike Waldner
+- Joel Friedly
+- Jakub Janoszek
+- Marc Abramowitz
+- Alex Gaynor

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/HACKING → desktop/core/ext-py/tablib-develop/HACKING


+ 5 - 1
desktop/core/ext-py/tablib-0.9.11/HISTORY.rst → desktop/core/ext-py/tablib-develop/HISTORY.rst

@@ -1,6 +1,10 @@
 History
 -------
 
+++++
+
+* Unicode Column Headers
+
 0.9.11 (2011-06-30)
 +++++++++++++++++++
 
@@ -16,7 +20,7 @@ History
 
 * Dataset API Changes
 * ``stack_rows`` => ``stack``, ``stack_columns`` => ``stack_cols``
-* column operations have their own methods now (``apend_col``, ``insert_col``)
+* column operations have their own methods now (``append_col``, ``insert_col``)
 * List-style ``pop()``
 * Redis-style ``rpush``, ``lpush``, ``rpop``, ``lpop``, ``rpush_col``, and ``lpush_col``
 

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/LICENSE → desktop/core/ext-py/tablib-develop/LICENSE


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/MANIFEST.in → desktop/core/ext-py/tablib-develop/MANIFEST.in


+ 459 - 0
desktop/core/ext-py/tablib-develop/NOTICE

@@ -0,0 +1,459 @@
+Tablib includes some vendorized python libraries: ordereddict, odfpy, pyyaml,
+simplejson, unicodecsv, xlrd, xlrd3, xlwt, and xlwt3.
+
+Markup License
+==============
+
+Markup is in the public domain.
+
+
+Odfpy License
+=============
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+
+OrderedDict License
+===================
+
+Copyright (c) 2009 Raymond Hettinger
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+PyYAML License
+==============
+
+Copyright (c) 2006 Kirill Simonov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+UnicodeCSV License
+==================
+
+Copyright 2010 Jeremy Dunck. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, this list of
+      conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, this list
+      of conditions and the following disclaimer in the documentation and/or other materials
+      provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY JEREMY DUNCK ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEREMY DUNCK OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of Jeremy Dunck.
+
+
+
+
+XLWT (and XLWT3) License
+========================
+
+Portions copyright © 2007, Stephen John Machin, Lingfo Pty Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. None of the names of Stephen John Machin, Lingfo Pty Ltd and any
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+"""
+  Copyright (C) 2005 Roman V. Kiseliov
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+  3. All advertising materials mentioning features or use of this
+     software must display the following acknowledgment:
+     "This product includes software developed by
+      Roman V. Kiseliov <roman@kiseliov.ru>."
+
+  4. Redistributions of any form whatsoever must retain the following
+     acknowledgment:
+     "This product includes software developed by
+      Roman V. Kiseliov <roman@kiseliov.ru>."
+
+  THIS SOFTWARE IS PROVIDED BY Roman V. Kiseliov ``AS IS'' AND ANY
+  EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL Roman V. Kiseliov OR
+  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+  OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Roman V. Kiseliov
+Russia
+Kursk
+Libknecht St., 4
+
++7(0712)56-09-83
+
+<roman@kiseliov.ru>
+Subject: pyExcelerator
+
+
+
+
+XLRD (and XLRD3) License
+========================
+
+Portions copyright © 2005-2009, Stephen John Machin, Lingfo Pty Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. None of the names of Stephen John Machin, Lingfo Pty Ltd and any
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Copyright (c) 2001 David Giffin.
+All rights reserved.
+
+Based on the the Java version: Andrew Khan Copyright (c) 2000.
+
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+3. All advertising materials mentioning features or use of this
+   software must display the following acknowledgment:
+   "This product includes software developed by
+    David Giffin <david@giffin.org>."
+
+4. Redistributions of any form whatsoever must retain the following
+   acknowledgment:
+   "This product includes software developed by
+    David Giffin <david@giffin.org>."
+
+THIS SOFTWARE IS PROVIDED BY DAVID GIFFIN ``AS IS'' AND ANY
+EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DAVID GIFFIN OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.

+ 3 - 2
desktop/core/ext-py/tablib-0.9.11/README.rst → desktop/core/ext-py/tablib-develop/README.rst

@@ -55,7 +55,7 @@ Intelligently add new rows: ::
 
 Intelligently add new columns: ::
 
-    >>> data.append(col=(90, 67, 83), header='age')
+    >>> data.append_col((90, 67, 83), header='age')
 
 Slice rows:  ::
 
@@ -117,7 +117,8 @@ EXCEL!
 ++++++
 ::
 
-	>>> open('people.xls', 'wb').write(data.xls)
+	>>> with open('people.xls', 'wb') as f:
+	...     f.write(data.xls)
 
 It's that easy.
 

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/TODO.rst → desktop/core/ext-py/tablib-develop/TODO.rst


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/Makefile → desktop/core/ext-py/tablib-develop/docs/Makefile


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/__init__.py → desktop/core/ext-py/tablib-develop/docs/__init__.py


+ 2 - 2
desktop/core/ext-py/tablib-0.9.11/docs/_templates/sidebarintro.html → desktop/core/ext-py/tablib-develop/docs/_templates/sidebarintro.html

@@ -1,4 +1,4 @@
-<h3><a href="http://tablib.org">About Tablib</a></h3>
+<h3><a href="http://docs.python-tablib.org">About Tablib</a></h3>
 <p>
   Tablib is an MIT Licensed format-agnostic tabular dataset library, written in Python. It allows you to import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags & filtering, and seamless format import & export.
 </p>
@@ -13,7 +13,7 @@
 
 <h3>Useful Links</h3>
 <ul>
-  <li><a href="http://tablib.org/">The Tablib Website</a></li>
+  <li><a href="http://docs.python-tablib.org/">The Tablib Website</a></li>
   <li><a href="http://pypi.python.org/pypi/tablib">Tablib @ PyPI</a></li>
   <li><a href="http://github.com/kennethreitz/tablib">Tablib @ GitHub</a></li>
   <li><a href="http://github.com/kennethreitz/tablib/issues">Issue Tracker</a></li>

+ 1 - 1
desktop/core/ext-py/tablib-0.9.11/docs/_templates/sidebarlogo.html → desktop/core/ext-py/tablib-develop/docs/_templates/sidebarlogo.html

@@ -1,4 +1,4 @@
-<h3><a href="http://tablib.org">About Tablib</a></h3>
+<h3><a href="http://docs.python-tablib.org/">About Tablib</a></h3>
 <p>
   Tablib is an MIT Licensed format-agnostic tabular dataset library, written in Python. It allows you to import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags & filtering, and seamless format import & export.
 </p>

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/.gitignore → desktop/core/ext-py/tablib-develop/docs/_themes/.gitignore


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/LICENSE → desktop/core/ext-py/tablib-develop/docs/_themes/LICENSE


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/README.rst → desktop/core/ext-py/tablib-develop/docs/_themes/README.rst


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/flask_theme_support.py → desktop/core/ext-py/tablib-develop/docs/_themes/flask_theme_support.py


+ 6 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr/layout.html → desktop/core/ext-py/tablib-develop/docs/_themes/kr/layout.html

@@ -15,6 +15,12 @@
     <a href="https://github.com/kennethreitz/tablib">
         <img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
     </a>
+
+    <script type="text/javascript" src="//www.hellobar.com/hellobar.js"></script>
+    <script type="text/javascript">
+        new HelloBar(36402,48802);
+    </script>
+
     <script type="text/javascript">
 
       var _gaq = _gaq || [];

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr/relations.html → desktop/core/ext-py/tablib-develop/docs/_themes/kr/relations.html


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr/static/flasky.css_t → desktop/core/ext-py/tablib-develop/docs/_themes/kr/static/flasky.css_t


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr/static/small_flask.css → desktop/core/ext-py/tablib-develop/docs/_themes/kr/static/small_flask.css


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr/theme.conf → desktop/core/ext-py/tablib-develop/docs/_themes/kr/theme.conf


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr_small/layout.html → desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/layout.html


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr_small/static/flasky.css_t → desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/static/flasky.css_t


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/_themes/kr_small/theme.conf → desktop/core/ext-py/tablib-develop/docs/_themes/kr_small/theme.conf


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/api.rst → desktop/core/ext-py/tablib-develop/docs/api.rst


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/conf.py → desktop/core/ext-py/tablib-develop/docs/conf.py


+ 11 - 16
desktop/core/ext-py/tablib-0.9.11/docs/development.rst → desktop/core/ext-py/tablib-develop/docs/development.rst

@@ -46,7 +46,7 @@ Source Control
 Tablib source is controlled with Git_, the lean, mean, distributed source
 control machine.
 
-The repository is publicly accessable.
+The repository is publicly accessible.
 
     ``git clone git://github.com/kennethreitz/tablib.git``
 
@@ -67,11 +67,11 @@ Feature / Hotfix / Release branches follow a `Successful Git Branching Model`_ .
 ``master``
     Current production release (|version|) on PyPi.
 ``gh-pages``
-    Current release of http://tablib.org.
+    Current release of http://docs.python-tablib.org.
 
 Each release is tagged.
 
-When submitting patches, please place your feature/change in its own branch prior to opening a pull reqeust on GitHub_.
+When submitting patches, please place your feature/change in its own branch prior to opening a pull request on GitHub_.
 
 
 .. _Git: http://git-scm.org
@@ -132,7 +132,7 @@ Tablib features a micro-framework for adding format support. The easiest way to
 
 2.
 
-    Add your new format module to the :class:`tablib.formats.avalable` tuple.
+    Add your new format module to the :class:`tablib.formats.available` tuple.
 
 3.
     Add a mock property to the :class:`Dataset <tablib.Dataset>` class with verbose `reStructured Text`_ docstring. This alleviates IDE confusion, and allows for pretty auto-generated Sphinx_ documentation.
@@ -174,20 +174,15 @@ This will generate a **nosetests.xml** file, which can then be analyzed.
 Continuous Integration
 ----------------------
 
-Every commit made to the **develop** branch is automatically tested and inspected upon receipt with `Jenkins CI`_. If you have access to the main repository and broke the build, you will receive an email accordingly.
+Every commit made to the **develop** branch is automatically tested and inspected upon receipt with `Travis CI`_. If you have access to the main repository and broke the build, you will receive an email accordingly.
 
 Anyone may view the build status and history at any time.
 
-    http://ci.kennethreitz.com/
-
-
-If you are trustworthy and plan to contribute to tablib on a regular basis, please contact `Kenneth Reitz`_ to get an account on the Jenkins Server.
-
+    https://travis-ci.org/kennethreitz/tablib
 
 Additional reports will also be included here in the future, including :pep:`8` checks and stress reports for extremely large datasets.
 
-.. _`Jenkins CI`: http://jenkins-ci.org/
-.. _`Kenneth Reitz`: http://kennethreitz.com/contact-me/
+.. _`Jenkins CI`: https://travis-ci.org/
 
 
 .. _docs:
@@ -210,13 +205,13 @@ Then, to build an HTML version of the docs, simply run the following from the **
 
 Your ``docs/_build/html`` directory will then contain an HTML representation of the documentation, ready for publication on most web servers.
 
-You can also generate the documentation in **ebpub**, **latex**, **json**, *&c* similarly.
+You can also generate the documentation in **epub**, **latex**, **json**, *&c* similarly.
 
 .. admonition:: GitHub Pages
 
 	To push the documentation up to `GitHub Pages`_, you will first need to run `sphinx-to-github`_ against your ``docs/_build/html`` directory.
 
-	GitHub Pages are powered by an HTML generation system called Jeckyl_, which is configured to ignore files and folders that begin with "``_``" (*ie.* **_static**).
+	GitHub Pages are powered by an HTML generation system called Jekyll_, which is configured to ignore files and folders that begin with "``_``" (*ie.* **_static**).
 
 
 
@@ -238,9 +233,9 @@ You can also generate the documentation in **ebpub**, **latex**, **json**, *&c*
 .. _`reStructured Text`: http://docutils.sourceforge.net/rst.html
 .. _Sphinx: http://sphinx.pocoo.org
 .. _`GitHub Pages`: http://pages.github.com
-.. _Jeckyl: http://github.com/mojombo/jekyll
+.. _Jekyll: http://github.com/mojombo/jekyll
 .. _`sphinx-to-github`: http://github.com/michaeljones/sphinx-to-github
 
 ----------
 
-Make sure to check out the :ref:`API Documentation <api>`.
+Make sure to check out the :ref:`API Documentation <api>`.

+ 3 - 3
desktop/core/ext-py/tablib-0.9.11/docs/index.rst → desktop/core/ext-py/tablib-develop/docs/index.rst

@@ -27,7 +27,7 @@ Tablib is an :ref:`MIT Licensed <mit>` format-agnostic tabular dataset library,
 ::
 
    >>> data = tablib.Dataset(headers=['First Name', 'Last Name', 'Age'])
-   >>> map(data.append, [('Kenneth', 'Reitz', 22), ('Bessie', 'Monke', 21)])
+   >>> data.extend([('Kenneth', 'Reitz', 23), ('Bessie', 'Monke', 22)])
 
    >>> data.json
    [{"Last Name": "Reitz", "First Name": "Kenneth", "Age": 22}, {"Last Name": "Monke", "First Name": "Bessie", "Age": 21}]
@@ -55,7 +55,7 @@ and `The Sunlight Foundation <http://sunlightfoundation.com/>`_ use Tablib inter
    Tablib by @kennethreitz saved my life. I had to consolidate like 5 huge poorly maintained lists of domains and data. It was a breeze!
 
 **Dave Coutts**
-   It's turning into one of my most used modules of 2010. You really hit a sweat spot for managing tabular data with a minimal amount of code and effort.
+   It's turning into one of my most used modules of 2010. You really hit a sweet spot for managing tabular data with a minimal amount of code and effort.
 
 **Joshua Ourisman**
    Tablib has made it so much easier to deal with the inevitable 'I want an Excel file!' requests from clients...
@@ -99,4 +99,4 @@ method, this part of the documentation is for you.
 .. toctree::
    :maxdepth: 2
 
-   api
+   api

+ 5 - 5
desktop/core/ext-py/tablib-0.9.11/docs/install.rst → desktop/core/ext-py/tablib-develop/docs/install.rst

@@ -2,7 +2,7 @@
 Installation
 ============
 
-This part of the documentation covers the installation of Tablib. The first step to using any software package is getting it properly installed. Please read this section carefully, or you may miss out on some nice  :ref:`speed enhancements <peed-extentions>`.
+This part of the documentation covers the installation of Tablib. The first step to using any software package is getting it properly installed. Please read this section carefully, or you may miss out on some nice  :ref:`speed enhancements <peed-extensions>`.
 
 
 .. _installing:
@@ -22,7 +22,7 @@ or, with `easy_install <http://pypi.python.org/pypi/setuptools>`_::
 
     $ easy_install tablib
 
-But, you really `shouldn't do that <http://www.pip-installer.org/en/latest/index.html#pip-compared-to-easy-install>`_.
+But, you really `shouldn't do that <http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install>`_.
 
 
 
@@ -57,15 +57,15 @@ To download the full source history from Git, see :ref:`Source Control <scm>`.
 .. _zipball: http://github.com/kennethreitz/tablib/zipball/master
 
 
-.. _speed-extentions:
-Speed Extentions
+.. _speed-extensions:
+Speed Extensions
 ----------------
 
 .. versionadded:: 0.8.5
 
 Tablib is partially dependent on the **pyyaml**, **simplejson**, and **xlwt** modules. To reduce installation issues, fully integrated versions of all required libraries are included in Tablib.
 
-However, if performance is important to you (and it should be), you can install  **pyyaml** with C extentions from PyPi. ::
+However, if performance is important to you (and it should be), you can install  **pyyaml** with C extensions from PyPi. ::
 
     $ pip install PyYAML
 

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/intro.rst → desktop/core/ext-py/tablib-develop/docs/intro.rst


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/docs/krstyle.sty → desktop/core/ext-py/tablib-develop/docs/krstyle.sty


+ 10 - 3
desktop/core/ext-py/tablib-0.9.11/docs/tutorial.rst → desktop/core/ext-py/tablib-develop/docs/tutorial.rst

@@ -68,7 +68,7 @@ Adding Headers
 --------------
 
 
-It's time enhance our :class:`Dataset` by giving our columns some titles. To do so, set :class:`Dataset.headers`. ::
+It's time to enhance our :class:`Dataset` by giving our columns some titles. To do so, set :class:`Dataset.headers`. ::
 
     data.headers = ['First Name', 'Last Name']
 
@@ -146,6 +146,13 @@ To do so, we access the :class:`Dataset` as if it were a standard Python diction
     >>> data['First Name']
     ['Kenneth', 'Bessie']
 
+You can also access the column using its index. ::
+
+    >>> d.headers
+    ['Last Name', 'First Name', 'Age']
+    >>> d.get_col(1)
+    ['Kenneth', 'Bessie']
+
 Let's find the average age. ::
 
     >>> ages = data['Age']
@@ -244,7 +251,7 @@ Filtering Datasets with Tags
 
 
 When constructing a :class:`Dataset` object, you can add tags to rows by specifying the ``tags`` parameter.
-This allows you to filter your :class:`Dataset` later. This can be useful so separate rows of data based on
+This allows you to filter your :class:`Dataset` later. This can be useful to separate rows of data based on
 arbitrary criteria (*e.g.* origin) that you don't want to include in your :class:`Dataset`.
 
 Let's tag some students. ::
@@ -256,7 +263,7 @@ Let's tag some students. ::
     students.rpush(['Kenneth', 'Reitz'], tags=['male', 'technical'])
     students.rpush(['Bessie', 'Monke'], tags=['female', 'creative'])
 
-Now that we have extra meta-data on our rows, we can use easily filter our :class:`Dataset`. Let's just see Male students. ::
+Now that we have extra meta-data on our rows, we can easily filter our :class:`Dataset`. Let's just see Male students. ::
 
 
     >>> students.filter(['male']).yaml

+ 26 - 12
desktop/core/ext-py/tablib-0.9.11/setup.py → desktop/core/ext-py/tablib-develop/setup.py

@@ -7,18 +7,11 @@ import sys
 import tablib
 
 try:
-    from setuptools import setup, find_packages
+    from setuptools import setup
 except ImportError:
-    from distutils.core import setup, find_packages
+    from distutils.core import setup
 
 
-packages = find_packages(exclude=('docs',))
-
-if sys.version_info[:2] < (3,0):
-    packages = [p for p in packages if '3' not in p]
-else:
-    packages = [p for p in packages if '2' not in p]
-
 if sys.argv[-1] == 'publish':
     os.system("python setup.py sdist upload")
     sys.exit()
@@ -40,7 +33,7 @@ if sys.argv[-1] == 'test':
         print('py.test required.')
         sys.exit(1)
 
-    os.system('pytest test_tablib.py')
+    os.system('py.test test_tablib.py')
     sys.exit()
 
 setup(
@@ -51,8 +44,28 @@ setup(
         open('HISTORY.rst').read()),
     author='Kenneth Reitz',
     author_email='me@kennethreitz.com',
-    url='http://tablib.org',
-    packages=packages,
+    url='http://python-tablib.org',
+    packages=[
+        'tablib', 'tablib.formats',
+        'tablib.packages',
+        'tablib.packages.xlwt',
+        'tablib.packages.xlwt3',
+        'tablib.packages.xlrd',
+        'tablib.packages.xlrd3',
+        'tablib.packages.omnijson',
+        'tablib.packages.odf',
+        'tablib.packages.odf3',
+        'tablib.packages.openpyxl',
+        'tablib.packages.openpyxl.shared',
+        'tablib.packages.openpyxl.reader',
+        'tablib.packages.openpyxl.writer',
+        'tablib.packages.openpyxl3',
+        'tablib.packages.openpyxl3.shared',
+        'tablib.packages.openpyxl3.reader',
+        'tablib.packages.openpyxl3.writer',
+        'tablib.packages.yaml',
+        'tablib.packages.unicodecsv'
+    ],
     license='MIT',
     classifiers=(
         'Development Status :: 5 - Production/Stable',
@@ -67,4 +80,5 @@ setup(
         'Programming Language :: Python :: 3.1',
         'Programming Language :: Python :: 3.2',
     ),
+    tests_require=['pytest'],
 )

+ 1 - 1
desktop/core/ext-py/tablib-0.9.11/tablib/__init__.py → desktop/core/ext-py/tablib-develop/tablib/__init__.py

@@ -1,7 +1,7 @@
 """ Tablib. """
 
 from tablib.core import (
-    Databook, Dataset, detect, import_set,
+    Databook, Dataset, detect, import_set, import_book,
     InvalidDatasetType, InvalidDimensions, UnsupportedFormat,
     __version__
 )

+ 5 - 1
desktop/core/ext-py/tablib-0.9.11/tablib/compat.py → desktop/core/ext-py/tablib-develop/tablib/compat.py

@@ -23,6 +23,8 @@ except ImportError:
 if is_py3:
     from io import BytesIO
     import tablib.packages.xlwt3 as xlwt
+    import tablib.packages.xlrd3 as xlrd
+    from tablib.packages.xlrd3.biffh import XLRDError
     from tablib.packages import markup3 as markup
     from tablib.packages import openpyxl3 as openpyxl
     from tablib.packages.odf3 import opendocument, style, text, table
@@ -39,6 +41,8 @@ else:
     from cStringIO import StringIO as BytesIO
     from cStringIO import StringIO
     import tablib.packages.xlwt as xlwt
+    import tablib.packages.xlrd as xlrd
+    from tablib.packages.xlrd.biffh import XLRDError
     from tablib.packages import markup
     from itertools import ifilter
     from tablib.packages import openpyxl
@@ -46,4 +50,4 @@ else:
 
     from tablib.packages import unicodecsv as csv
 
-    unicode = unicode
+    unicode = unicode

+ 120 - 41
desktop/core/ext-py/tablib-0.9.11/tablib/core.py → desktop/core/ext-py/tablib-develop/tablib/core.py

@@ -14,7 +14,7 @@ from operator import itemgetter
 
 from tablib import formats
 
-from tablib.compat import OrderedDict
+from tablib.compat import OrderedDict, unicode
 
 
 __title__ = 'tablib'
@@ -29,7 +29,7 @@ __docformat__ = 'restructuredtext'
 class Row(object):
     """Internal Row object. Mainly used for filtering."""
 
-    __slots__ = ['tuple', '_row', 'tags']
+    __slots__ = ['_row', 'tags']
 
     def __init__(self, row=list(), tags=list()):
         self._row = list(row)
@@ -57,7 +57,14 @@ class Row(object):
         del self._row[i]
 
     def __getstate__(self):
-        return {'slot': [getattr(self, slot) for slot in self.__slots__]}
+
+        slots = dict()
+
+        for slot in self.__slots__:
+            attribute = getattr(self, slot)
+            slots[slot] = attribute
+
+        return slots
 
     def __setstate__(self, state):
         for (k, v) in list(state.items()): setattr(self, k, v)
@@ -105,7 +112,7 @@ class Dataset(object):
     functionality.
 
     Usually you create a :class:`Dataset` instance in your main module, and append
-    rows and columns as you collect data. ::
+    rows as you collect data. ::
 
         data = tablib.Dataset()
         data.headers = ('name', 'age')
@@ -113,15 +120,27 @@ class Dataset(object):
         for (name, age) in some_collector():
             data.append((name, age))
 
-    You can also set rows and headers upon instantiation. This is useful if dealing
-    with dozens or hundres of :class:`Dataset` objects. ::
+
+    Setting columns is similar. The column data length must equal the
+    current height of the data and headers must be set ::
+
+        data = tablib.Dataset()
+        data.headers = ('first_name', 'last_name')
+
+        data.append(('John', 'Adams'))
+        data.append(('George', 'Washington'))
+
+        data.append_col((90, 67), header='age')
+
+
+    You can also set rows and headers upon instantiation. This is useful if
+    dealing with dozens or hundreds of :class:`Dataset` objects. ::
 
         headers = ('first_name', 'last_name')
         data = [('John', 'Adams'), ('George', 'Washington')]
 
         data = tablib.Dataset(*data, headers=headers)
 
-
     :param \*args: (optional) list of rows to populate Dataset
     :param headers: (optional) list strings for Dataset header row
 
@@ -162,7 +181,7 @@ class Dataset(object):
 
 
     def __getitem__(self, key):
-        if isinstance(key, str):
+        if isinstance(key, str) or isinstance(key, unicode):
             if key in self.headers:
                 pos = self.headers.index(key) # get 'key' index from each data
                 return [row[pos] for row in self._data]
@@ -175,14 +194,13 @@ class Dataset(object):
             else:
                 return [result.tuple for result in _results]
 
-
     def __setitem__(self, key, value):
         self._validate(value)
         self._data[key] = Row(value)
 
 
     def __delitem__(self, key):
-        if isinstance(key, str):
+        if isinstance(key, str) or isinstance(key, unicode):
 
             if key in self.headers:
 
@@ -205,6 +223,25 @@ class Dataset(object):
         except AttributeError:
             return '<dataset object>'
 
+    def __unicode__(self):
+        result = [self.__headers]
+
+        result.extend(list(map(unicode, row)) for row in self._data)
+
+        # here, we calculate max width for each column
+        lens = (list(map(len, row)) for row in result)
+        field_lens = list(map(max, zip(*lens)))
+
+        # delimiter between header and data
+        result.insert(1, ['-' * length for length in field_lens])
+
+        format_string = '|'.join('{%s:%s}' % item for item in enumerate(field_lens))
+
+        return '\n'.join(format_string.format(*row) for row in result)
+
+    def __str__(self):
+        return self.__unicode__()
+
 
     # ---------
     # Internals
@@ -410,7 +447,7 @@ class Dataset(object):
              :class:`Dataset.xls` contains binary data, so make sure to write in binary mode::
 
                 with open('output.xls', 'wb') as f:
-                    f.write(data.xls)'
+                    f.write(data.xls)
         """
         pass
 
@@ -423,7 +460,7 @@ class Dataset(object):
              :class:`Dataset.xlsx` contains binary data, so make sure to write in binary mode::
 
                 with open('output.xlsx', 'wb') as f:
-                    f.write(data.xlsx)'
+                    f.write(data.xlsx)
         """
         pass
 
@@ -433,10 +470,10 @@ class Dataset(object):
 
          .. admonition:: Binary Warning
 
-             :class:`Dataset.xlsx` contains binary data, so make sure to write in binary mode::
+             :class:`Dataset.ods` contains binary data, so make sure to write in binary mode::
 
                 with open('output.ods', 'wb') as f:
-                    f.write(data.ods)'
+                    f.write(data.ods)
         """
         pass
 
@@ -452,6 +489,17 @@ class Dataset(object):
             data.csv = 'age, first_name, last_name\\n90, John, Adams'
 
         Import assumes (for now) that headers exist.
+
+        .. admonition:: Binary Warning
+
+             :class:`Dataset.csv` uses \\r\\n line endings by default, so make
+             sure to write in binary mode::
+
+                 with open('output.csv', 'wb') as f:
+                     f.write(data.csv)
+
+             If you do not do this, and you export the file on Windows, your
+             CSV file will open in Excel with a blank line between each row.
         """
         pass
 
@@ -477,7 +525,7 @@ class Dataset(object):
         set, a YAML list of objects will be returned. If no headers have
         been set, a YAML list of lists (rows) will be returned instead.
 
-        A dataset object can also be imported by setting the :class:`Dataset.json` attribute: ::
+        A dataset object can also be imported by setting the :class:`Dataset.yaml` attribute: ::
 
             data = tablib.Dataset()
             data.yaml = '- {age: 90, first_name: John, last_name: Adams}'
@@ -500,6 +548,7 @@ class Dataset(object):
 
         Import assumes (for now) that headers exist.
         """
+        pass
 
     @property
     def html():
@@ -518,30 +567,11 @@ class Dataset(object):
     def insert(self, index, row, tags=list()):
         """Inserts a row to the :class:`Dataset` at the given index.
 
-        Rows and columns inserted must be the correct size (height or width).
+        Rows inserted must be the correct size (height or width).
 
         The default behaviour is to insert the given row to the :class:`Dataset`
-        object at the given index. If the ``col`` parameter is given, however,
-        a new column will be insert to the :class:`Dataset` object instead.
-
-        You can also insert a column of a single callable object, which will
-        add a new column with the return values of the callable each as an
-        item in the column. ::
-
-            data.append(col=random.randint)
-
-        See :ref:`dyncols` for an in-depth example.
-
-        .. versionchanged:: 0.9.0
-           If inserting a column, and :class:`Dataset.headers` is set, the
-           header attribute must be set, and will be considered the header for
-           that row.
-
-        .. versionadded:: 0.9.0
-           If inserting a row, you can add :ref:`tags <tags>` to the row you are inserting.
-           This gives you the ability to :class:`filter <Dataset.filter>` your
-           :class:`Dataset` later.
-        """
+        object at the given index.
+       """
 
         self._validate(row)
         self._data.insert(index, Row(row, tags=tags))
@@ -570,6 +600,14 @@ class Dataset(object):
 
         self.rpush(row, tags)
 
+    def extend(self, rows, tags=list()):
+        """Adds a list of rows to the :class:`Dataset` using
+        :class:`Dataset.append`
+        """
+
+        for row in rows:
+            self.append(row, tags)
+
 
     def lpop(self):
         """Removes and returns the first row of the :class:`Dataset`."""
@@ -615,8 +653,22 @@ class Dataset(object):
         that row.
 
         See :ref:`dyncols` for an in-depth example.
+
+        .. versionchanged:: 0.9.0
+           If inserting a column, and :class:`Dataset.headers` is set, the
+           header attribute must be set, and will be considered the header for
+           that row.
+
+        .. versionadded:: 0.9.0
+           If inserting a row, you can add :ref:`tags <tags>` to the row you are inserting.
+           This gives you the ability to :class:`filter <Dataset.filter>` your
+           :class:`Dataset` later.
+
         """
 
+        if col is None:
+            col = []
+
         # Callable Columns...
         if hasattr(col, '__call__'):
             col = list(map(col, self._data))
@@ -628,8 +680,14 @@ class Dataset(object):
             # pop the first item off, add to headers
             if not header:
                 raise HeadersNeeded()
+
+            # corner case - if header is set without data
+            elif header and self.height == 0 and len(col):
+                raise InvalidDimensions
+
             self.headers.insert(index, header)
 
+
         if self.height and self.width:
 
             for i, row in enumerate(self._data):
@@ -684,6 +742,12 @@ class Dataset(object):
         self.rpush_col(col, header)
 
 
+    def get_col(self, index):
+        """Returns the column from the :class:`Dataset` at the given index."""
+
+        return [row[index] for row in self._data]
+
+
     # ----
     # Misc
     # ----
@@ -730,13 +794,13 @@ class Dataset(object):
         sorted.
         """
 
-        if isinstance(col, str):
+        if isinstance(col, str) or isinstance(col, unicode):
 
             if not self.headers:
                 raise HeadersNeeded
 
             _sorted = sorted(self.dict, key=itemgetter(col), reverse=reverse)
-            _dset = Dataset(headers=self.headers)
+            _dset = Dataset(headers=self.headers, title=self.title)
 
             for item in _sorted:
                 row = [item[key] for key in self.headers]
@@ -747,7 +811,7 @@ class Dataset(object):
                 col = self.headers[col]
 
             _sorted = sorted(self.dict, key=itemgetter(col), reverse=reverse)
-            _dset = Dataset(headers=self.headers)
+            _dset = Dataset(headers=self.headers, title=self.title)
 
             for item in _sorted:
                 if self.headers:
@@ -891,10 +955,12 @@ class Databook(object):
             except AttributeError:
                 pass
 
+    def sheets(self):
+        return self._datasets
 
     def add_sheet(self, dataset):
         """Adds given :class:`Dataset` to the :class:`Databook`."""
-        if type(dataset) is Dataset:
+        if isinstance(dataset, Dataset):
             self._datasets.append(dataset)
         else:
             raise InvalidDatasetType
@@ -947,6 +1013,19 @@ def import_set(stream):
         return None
 
 
+def import_book(stream):
+    """Return dataset of given stream."""
+    (format, stream) = detect(stream)
+
+    try:
+        databook = Databook()
+        format.import_book(databook, stream)
+        return databook
+
+    except AttributeError:
+        return None
+
+
 class InvalidDatasetType(Exception):
     "Only Datasets can be added to a DataBook"
 

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/formats/__init__.py → desktop/core/ext-py/tablib-develop/tablib/formats/__init__.py


+ 4 - 4
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_csv.py → desktop/core/ext-py/tablib-develop/tablib/formats/_csv.py

@@ -7,7 +7,7 @@ from tablib.compat import is_py3, csv, StringIO
 
 
 title = 'csv'
-extentions = ('csv',)
+extensions = ('csv',)
 
 
 DEFAULT_ENCODING = 'utf-8'
@@ -49,7 +49,7 @@ def import_set(dset, in_stream, headers=True):
 def detect(stream):
     """Returns True if given stream is valid CSV."""
     try:
-        csv.Sniffer().sniff(stream)
+        csv.Sniffer().sniff(stream, delimiters=',')
         return True
-    except csv.Error:
-        return False
+    except (csv.Error, TypeError):
+        return False

+ 11 - 4
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_html.py → desktop/core/ext-py/tablib-develop/tablib/formats/_html.py

@@ -14,11 +14,12 @@ else:
     from tablib.packages import markup
 
 import tablib
+import codecs
 
 BOOK_ENDINGS = 'h3'
 
 title = 'html'
-extentions = ('html', )
+extensions = ('html', )
 
 
 def export_set(dataset):
@@ -30,18 +31,24 @@ def export_set(dataset):
 	page.table.open()
 
 	if dataset.headers is not None:
+		new_header = [item if item is not None else '' for item in dataset.headers] 
+
 		page.thead.open()
-		headers = markup.oneliner.th(dataset.headers)
+		headers = markup.oneliner.th(new_header)
 		page.tr(headers)
 		page.thead.close()
 
 	for row in dataset:
-		html_row = markup.oneliner.td(row)
+		new_row = [item if item is not None else '' for item in row] 
+
+		html_row = markup.oneliner.td(new_row)
 		page.tr(html_row)
 
 	page.table.close()
 
-	stream.writelines(str(page))
+    # Allow unicode characters in output
+	wrapper = codecs.getwriter("utf8")(stream)
+	wrapper.writelines(unicode(page))
 
 	return stream.getvalue()
 

+ 1 - 1
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_json.py → desktop/core/ext-py/tablib-develop/tablib/formats/_json.py

@@ -10,7 +10,7 @@ from tablib.packages import omnijson as json
 
 
 title = 'json'
-extentions = ('json', 'jsn')
+extensions = ('json', 'jsn')
 
 
 def export_set(dataset):

+ 1 - 1
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_ods.py → desktop/core/ext-py/tablib-develop/tablib/formats/_ods.py

@@ -14,7 +14,7 @@ else:
 from tablib.compat import opendocument, style, table, text, unicode
 
 title = 'ods'
-extentions = ('ods',)
+extensions = ('ods',)
 
 bold = style.Style(name="bold", family="paragraph")
 bold.addElement(style.TextProperties(fontweight="bold", fontweightasian="bold", fontweightcomplex="bold"))

+ 4 - 4
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_tsv.py → desktop/core/ext-py/tablib-develop/tablib/formats/_tsv.py

@@ -8,7 +8,7 @@ from tablib.compat import is_py3, csv, StringIO
 
 
 title = 'tsv'
-extentions = ('tsv',)
+extensions = ('tsv',)
 
 DEFAULT_ENCODING = 'utf-8'
 
@@ -34,9 +34,9 @@ def import_set(dset, in_stream, headers=True):
     dset.wipe()
 
     if is_py3:
-        rows = csv.reader(in_stream.split('\r\n'), delimiter='\t')
+        rows = csv.reader(in_stream.splitlines(), delimiter='\t')
     else:
-        rows = csv.reader(in_stream.split('\r\n'), delimiter='\t',
+        rows = csv.reader(in_stream.splitlines(), delimiter='\t',
                           encoding=DEFAULT_ENCODING)
 
     for i, row in enumerate(rows):
@@ -55,5 +55,5 @@ def detect(stream):
     try:
         csv.Sniffer().sniff(stream, delimiters='\t')
         return True
-    except csv.Error:
+    except (csv.Error, TypeError):
         return False

+ 58 - 5
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_xls.py → desktop/core/ext-py/tablib-develop/tablib/formats/_xls.py

@@ -5,17 +5,36 @@
 
 import sys
 
-from tablib.compat import BytesIO, xlwt
-
+from tablib.compat import BytesIO, xlwt, xlrd, XLRDError
+import tablib
 
 title = 'xls'
-extentions = ('xls',)
+extensions = ('xls',)
 
 # special styles
 wrap = xlwt.easyxf("alignment: wrap on")
 bold = xlwt.easyxf("font: bold on")
 
 
+def detect(stream):
+    """Returns True if given stream is a readable excel file."""
+    try:
+        xlrd.open_workbook(file_contents=stream)
+        return True
+    except (TypeError, XLRDError):
+        pass 
+    try:
+        xlrd.open_workbook(file_contents=stream.read())
+        return True
+    except (AttributeError, XLRDError):
+        pass
+    try:
+        xlrd.open_workbook(filename=stream)
+        return True
+    except:
+        return False
+
+
 def export_set(dataset):
     """Returns XLS representation of Dataset."""
 
@@ -45,6 +64,42 @@ def export_book(databook):
     return stream.getvalue()
 
 
+def import_set(dset, in_stream, headers=True):
+    """Returns databook from XLS stream."""
+
+    dset.wipe()
+
+    xls_book = xlrd.open_workbook(file_contents=in_stream)
+    sheet = xls_book.sheet_by_index(0)
+
+    dset.title = sheet.name
+
+    for i in xrange(sheet.nrows):
+        if (i == 0) and (headers):
+            dset.headers = sheet.row_values(0)
+        else:
+            dset.append(sheet.row_values(i))
+
+def import_book(dbook, in_stream, headers=True):
+    """Returns databook from XLS stream."""
+
+    dbook.wipe()
+
+    xls_book = xlrd.open_workbook(file_contents=in_stream)
+
+    for sheet in xls_book.sheets():
+        data = tablib.Dataset()
+        data.title = sheet.name
+
+        for i in xrange(sheet.nrows):
+            if (i == 0) and (headers):
+                data.headers = sheet.row_values(0)
+            else:
+                data.append(sheet.row_values(i))
+
+        dbook.add_sheet(data)
+
+
 def dset_sheet(dataset, ws):
     """Completes given worksheet from given Dataset."""
     _package = dataset._package(dicts=False)
@@ -78,5 +133,3 @@ def dset_sheet(dataset, ws):
                         ws.write(i, j, col)
                 except TypeError:
                     ws.write(i, j, col)
-
-

+ 55 - 4
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_xlsx.py → desktop/core/ext-py/tablib-develop/tablib/formats/_xlsx.py

@@ -12,6 +12,7 @@ else:
     from cStringIO import StringIO as BytesIO
 
 from tablib.compat import openpyxl
+import tablib
 
 Workbook = openpyxl.workbook.Workbook
 ExcelWriter = openpyxl.writer.excel.ExcelWriter
@@ -21,7 +22,16 @@ from tablib.compat import unicode
 
 
 title = 'xlsx'
-extentions = ('xlsx',)
+extensions = ('xlsx',)
+
+
+def detect(stream):
+    """Returns True if given stream is a readable excel file."""
+    try:
+        openpyxl.reader.excel.load_workbook(stream)
+        return True
+    except openpyxl.shared.exc.InvalidFileException:
+        pass
 
 def export_set(dataset):
     """Returns XLSX representation of Dataset."""
@@ -41,7 +51,7 @@ def export_book(databook):
     """Returns XLSX representation of DataBook."""
 
     wb = Workbook()
-    ew = ExcelWriter(workbook = wb)
+    wb.worksheets = []
     for i, dset in enumerate(databook._datasets):
         ws = wb.create_sheet()
         ws.title = dset.title if dset.title else 'Sheet%s' % (i)
@@ -50,10 +60,49 @@ def export_book(databook):
 
 
     stream = BytesIO()
-    ew.save(stream)
+    wb.save(stream)
     return stream.getvalue()
 
 
+def import_set(dset, in_stream, headers=True):
+    """Returns databook from XLS stream."""
+
+    dset.wipe()
+
+    xls_book = openpyxl.reader.excel.load_workbook(in_stream)
+    sheet = xls_book.get_active_sheet()
+
+    dset.title = sheet.title
+
+    for i, row in enumerate(sheet.rows):
+        row_vals = [c.value for c in row]
+        if (i == 0) and (headers):
+            dset.headers = row_vals
+        else:
+            dset.append(row_vals)
+
+
+def import_book(dbook, in_stream, headers=True):
+    """Returns databook from XLS stream."""
+
+    dbook.wipe()
+
+    xls_book = openpyxl.reader.excel.load_workbook(in_stream)
+
+    for sheet in xls_book.worksheets:
+        data = tablib.Dataset()
+        data.title = sheet.title
+
+        for i, row in enumerate(sheet.rows):
+            row_vals = [c.value for c in row]
+            if (i == 0) and (headers):
+                data.headers = row_vals
+            else:
+                data.append(row_vals)
+
+        dbook.add_sheet(data)
+
+
 def dset_sheet(dataset, ws):
     """Completes given worksheet from given Dataset."""
     _package = dataset._package(dicts=False)
@@ -66,6 +115,8 @@ def dset_sheet(dataset, ws):
         row_number = i + 1
         for j, col in enumerate(row):
             col_idx = get_column_letter(j + 1)
+            # We want to freeze the column after the last column
+            frzn_col_idx = get_column_letter(j + 2)
 
             # bold headers
             if (row_number == 1) and dataset.headers:
@@ -74,7 +125,7 @@ def dset_sheet(dataset, ws):
                 ws.cell('%s%s'%(col_idx, row_number)).value = unicode(col)
                 style = ws.get_style('%s%s' % (col_idx, row_number))
                 style.font.bold = True
-                ws.freeze_panes = '%s%s' % (col_idx, row_number)
+                ws.freeze_panes = '%s%s' % (frzn_col_idx, row_number)
 
 
             # bold separators

+ 8 - 7
desktop/core/ext-py/tablib-0.9.11/tablib/formats/_yaml.py → desktop/core/ext-py/tablib-develop/tablib/formats/_yaml.py

@@ -19,26 +19,26 @@ import tablib
 
 
 title = 'yaml'
-extentions = ('yaml', 'yml')
+extensions = ('yaml', 'yml')
 
 
 
 def export_set(dataset):
     """Returns YAML representation of Dataset."""
 
-    return yaml.dump(dataset._package(ordered=False))
+    return yaml.safe_dump(dataset._package(ordered=False))
 
 
 def export_book(databook):
     """Returns YAML representation of Databook."""
-    return yaml.dump(databook._package())
+    return yaml.safe_dump(databook._package(ordered=False))
 
 
 def import_set(dset, in_stream):
     """Returns dataset from YAML stream."""
 
     dset.wipe()
-    dset.dict = yaml.load(in_stream)
+    dset.dict = yaml.safe_load(in_stream)
 
 
 def import_book(dbook, in_stream):
@@ -55,10 +55,11 @@ def import_book(dbook, in_stream):
 def detect(stream):
     """Returns True if given stream is valid YAML."""
     try:
-        _yaml = yaml.load(stream)
+        _yaml = yaml.safe_load(stream)
         if isinstance(_yaml, (list, tuple, dict)):
             return True
         else:
             return False
-    except yaml.parser.ParserError:
-        return False
+    except (yaml.parser.ParserError, yaml.reader.ReaderError,
+            yaml.scanner.ScannerError):
+        return False

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/__init__.py → desktop/core/ext-py/tablib-develop/tablib/packages/__init__.py


+ 6 - 6
desktop/core/ext-py/tablib-0.9.11/tablib/packages/markup.py → desktop/core/ext-py/tablib-develop/tablib/packages/markup.py

@@ -67,7 +67,7 @@ class element:
     def render( self, tag, single, between, kwargs ):
         """Append the actual tags to content."""
 
-        out = "<%s" % tag
+        out = u"<%s" % tag
         for key, value in kwargs.iteritems( ):
             if value is not None:               # when value is None that means stuff like <... checked>
                 key = key.strip('_')            # strip this so class_ will mean class, etc.
@@ -75,16 +75,16 @@ class element:
                     key = 'http-equiv'
                 elif key == 'accept_charset':
                     key = 'accept-charset'
-                out = "%s %s=\"%s\"" % ( out, key, escape( value ) )
+                out = u"%s %s=\"%s\"" % ( out, key, escape( value ) )
             else:
-                out = "%s %s" % ( out, key )
+                out = u"%s %s" % ( out, key )
         if between is not None:
-            out = "%s>%s</%s>" % ( out, between, tag )
+            out = u"%s>%s</%s>" % ( out, between, tag )
         else:
             if single:
-                out = "%s />" % out
+                out = u"%s />" % out
             else:
-                out = "%s>" % out
+                out = u"%s>" % out
         if self.parent is not None:
             self.parent.content.append( out )
         else:

+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/markup3.py → desktop/core/ext-py/tablib-develop/tablib/packages/markup3.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/__init__.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/__init__.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/anim.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/anim.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/attrconverters.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/attrconverters.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/chart.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/chart.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/config.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/config.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/dc.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/dc.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/dr3d.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/dr3d.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/draw.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/draw.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/easyliststyle.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/easyliststyle.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/element.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/element.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/elementtypes.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/elementtypes.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/form.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/form.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/grammar.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/grammar.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/load.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/load.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/manifest.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/manifest.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/math.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/math.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/meta.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/meta.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/namespaces.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/namespaces.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/number.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/number.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/odf2moinmoin.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/odf2moinmoin.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/odf2xhtml.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/odf2xhtml.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/odfmanifest.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/odfmanifest.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/office.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/office.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/opendocument.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/opendocument.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/presentation.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/presentation.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/script.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/script.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/style.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/style.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/svg.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/svg.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/table.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/table.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/teletype.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/teletype.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/text.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/text.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/thumbnail.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/thumbnail.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/userfield.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/userfield.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf/xforms.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf/xforms.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/__init__.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/__init__.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/anim.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/anim.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/attrconverters.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/attrconverters.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/chart.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/chart.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/config.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/config.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/dc.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/dc.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/dr3d.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/dr3d.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/draw.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/draw.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/easyliststyle.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/easyliststyle.py


+ 0 - 0
desktop/core/ext-py/tablib-0.9.11/tablib/packages/odf3/element.py → desktop/core/ext-py/tablib-develop/tablib/packages/odf3/element.py


Some files were not shown because too many files changed in this diff