PK!C++pyhandsontable/__init__.pyfrom .app import generate_html, view_table PK!+`Wpyhandsontable/app.pyfrom jinja2 import Environment, PackageLoader from threading import Timer import os from collections import OrderedDict from IPython.display import IFrame env = Environment( loader=PackageLoader('pyhandsontable', 'templates') ) def generate_html(data, **kwargs): renderers = kwargs.pop('renderers', dict()) if isinstance(data[0], (dict, OrderedDict)): headers = data[0].keys() else: headers = range(len(data[0])) columns = [] for header in headers: columnData = { 'data': header } if header in renderers.keys(): columnData['renderer'] = renderers.get(header) columns.append(columnData) template = env.get_template('sheet.html') return template.render(data=data, columns=columns, **kwargs) def view_table(data, width=800, height=500, filename='temp.handsontable.html', autodelete=True, **kwargs): # A TemporaryFile does not work with Jupyter Notebook try: with open(filename, 'w') as f: f.write(generate_html(data=data, width=width, height=height, **kwargs)) return IFrame(filename, width=width, height=height) finally: if autodelete: Timer(5, os.unlink, args=[filename]).start() PK!}H#pyhandsontable/templates/sheet.html {{ title }}
PK! ::&pyhandsontable-0.2.7.dist-info/LICENSEMIT License Copyright (c) 2018 Pacharapol Withayasakpunt 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. PK!H_zT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K! ::& pyhandsontable-0.2.7.dist-info/LICENSEPK!H_zTT$pyhandsontable-0.2.7.dist-info/WHEELPK!H1Rq'pyhandsontable-0.2.7.dist-info/METADATAPK!H@>g=%^pyhandsontable-0.2.7.dist-info/RECORDPK*