xform.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:fieldsight-kobocat 作者: awemulya 项目源码 文件源码
def _xls_file_io(self):
        '''
        pulls the xls file from remote storage

        this should be used sparingly
        '''
        file_path = self.xls.name
        default_storage = get_storage_class()()

        if file_path != '' and default_storage.exists(file_path):
            with default_storage.open(file_path) as ff:
                if file_path.endswith('.csv'):
                    return convert_csv_to_xls(ff.read())
                else:
                    return StringIO(ff.read())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号