xlwings-utils 25.0.0.post6__py3-none-any.whl → 25.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xlwings-utils might be problematic. Click here for more details.
- xlwings_utils/xlwings_utils.py +15 -5
- {xlwings_utils-25.0.0.post6.dist-info → xlwings_utils-25.0.2.dist-info}/METADATA +1 -1
- xlwings_utils-25.0.2.dist-info/RECORD +6 -0
- {xlwings_utils-25.0.0.post6.dist-info → xlwings_utils-25.0.2.dist-info}/WHEEL +1 -1
- xlwings_utils-25.0.0.post6.dist-info/RECORD +0 -6
- {xlwings_utils-25.0.0.post6.dist-info → xlwings_utils-25.0.2.dist-info}/top_level.txt +0 -0
xlwings_utils/xlwings_utils.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# /_/\_\|_| \_/\_/ |_||_| |_| \__, ||___/ _____ \__,_| \__||_||_||___/
|
|
6
6
|
# |___/ |_____|
|
|
7
7
|
|
|
8
|
-
__version__ = "25.0.
|
|
8
|
+
__version__ = "25.0.2"
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
import dropbox
|
|
@@ -169,14 +169,19 @@ def read_dropbox(dropbox_path):
|
|
|
169
169
|
----
|
|
170
170
|
If REFRESH_TOKEN, APP_KEY and APP_SECRET environment variables are specified,
|
|
171
171
|
it is not necessary to call dropbox_init() prior to any dropbox function.
|
|
172
|
+
|
|
173
|
+
If the filesize does not match the metadata, as sometimes happens on pyodide, an IOError exception will be raised.
|
|
172
174
|
"""
|
|
173
175
|
|
|
174
176
|
_login_dbx()
|
|
175
177
|
metadata, response = dbx.files_download(dropbox_path)
|
|
176
178
|
file_content = response.content
|
|
179
|
+
if len(file_content) != metadata.size:
|
|
180
|
+
raise OSError('filesize does not match metadata')
|
|
177
181
|
return file_content
|
|
178
182
|
|
|
179
183
|
|
|
184
|
+
|
|
180
185
|
def write_dropbox(dropbox_path, contents):
|
|
181
186
|
_login_dbx()
|
|
182
187
|
"""
|
|
@@ -646,16 +651,21 @@ class Capture:
|
|
|
646
651
|
|
|
647
652
|
Parameters
|
|
648
653
|
----------
|
|
654
|
+
enabled : bool
|
|
655
|
+
if True (default), all stdout output is captured
|
|
656
|
+
|
|
657
|
+
if False, stdout output is printed
|
|
658
|
+
|
|
649
659
|
include_print : bool
|
|
650
|
-
if
|
|
660
|
+
if False (default), nothing will be printed if enabled is True
|
|
651
661
|
|
|
652
|
-
if
|
|
662
|
+
if True, output will be printed (and captured if enabled is True)
|
|
653
663
|
|
|
654
664
|
Note
|
|
655
665
|
----
|
|
656
|
-
Use this function
|
|
666
|
+
Use this function, like ::
|
|
657
667
|
|
|
658
|
-
|
|
668
|
+
capture = xwu.Capture():
|
|
659
669
|
...
|
|
660
670
|
"""
|
|
661
671
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
xlwings_utils/__init__.py,sha256=FdaRztevSu5akGL7KBUBRzqwLMRTdvVUuS2Kfp2f1Uc,68
|
|
2
|
+
xlwings_utils/xlwings_utils.py,sha256=q5IAM9w1znR6wRBiZM5mlq1I21GnbV45xU5VGlAuL3Y,22039
|
|
3
|
+
xlwings_utils-25.0.2.dist-info/METADATA,sha256=T9Uej_FZgj2K_YtlE2Wj-wT95G0muVwXJBA7UYmhALc,9791
|
|
4
|
+
xlwings_utils-25.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
+
xlwings_utils-25.0.2.dist-info/top_level.txt,sha256=kf5SEv0gZiRObPhUoYcc1O_iX_wwTOPeUIYvzyYeAM4,14
|
|
6
|
+
xlwings_utils-25.0.2.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
xlwings_utils/__init__.py,sha256=FdaRztevSu5akGL7KBUBRzqwLMRTdvVUuS2Kfp2f1Uc,68
|
|
2
|
-
xlwings_utils/xlwings_utils.py,sha256=wUaw5KwM3KnKTegSHNqVrXKIIAEtTEIdsyFAjfhJDUo,21652
|
|
3
|
-
xlwings_utils-25.0.0.post6.dist-info/METADATA,sha256=kr3GwdUxMr6ULmz7nXkjyOej_O3vrraRPbowYdoBDJQ,9797
|
|
4
|
-
xlwings_utils-25.0.0.post6.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
5
|
-
xlwings_utils-25.0.0.post6.dist-info/top_level.txt,sha256=kf5SEv0gZiRObPhUoYcc1O_iX_wwTOPeUIYvzyYeAM4,14
|
|
6
|
-
xlwings_utils-25.0.0.post6.dist-info/RECORD,,
|
|
File without changes
|