xlwings-utils 0.0.7.post1__tar.gz → 0.0.7.post2__tar.gz
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-0.0.7.post1 → xlwings_utils-0.0.7.post2}/PKG-INFO +1 -1
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/pyproject.toml +1 -1
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils/xlwings_utils.py +10 -14
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/PKG-INFO +1 -1
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/README.md +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/setup.cfg +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/tests/test_xlwings_utils.py +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils/__init__.py +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/SOURCES.txt +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/dependency_links.txt +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/requires.txt +0 -0
- {xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/top_level.txt +0 -0
|
@@ -428,32 +428,25 @@ class handle_capture_stdout:
|
|
|
428
428
|
return False
|
|
429
429
|
|
|
430
430
|
def write(self, data):
|
|
431
|
-
|
|
432
|
-
_buffer.append(data)
|
|
431
|
+
_buffer.append(data)
|
|
433
432
|
if _do_print:
|
|
434
433
|
_org_stdout.write(data)
|
|
435
434
|
|
|
436
435
|
def flush(self):
|
|
437
436
|
if _do_print:
|
|
438
437
|
_org_stdout.flush()
|
|
439
|
-
|
|
440
|
-
_buffer.append("\n")
|
|
438
|
+
_buffer.append("\n")
|
|
441
439
|
|
|
442
440
|
|
|
443
441
|
def reset():
|
|
444
442
|
global _buffer
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
_buffer = []
|
|
448
|
-
_do_print = True
|
|
449
|
-
_do_capture = False
|
|
443
|
+
sys.stdout=_org_stdout
|
|
444
|
+
_buffer=[]
|
|
450
445
|
|
|
451
|
-
sys.stdout = handle_capture_stdout()
|
|
452
446
|
reset()
|
|
453
447
|
|
|
454
448
|
def capture_stdout(do_print=True, do_capture=True, clear=True):
|
|
455
449
|
global _do_print
|
|
456
|
-
global _do_capture
|
|
457
450
|
"""
|
|
458
451
|
start capture stdout
|
|
459
452
|
|
|
@@ -474,10 +467,13 @@ def capture_stdout(do_print=True, do_capture=True, clear=True):
|
|
|
474
467
|
"""
|
|
475
468
|
if not (do_print or do_capture):
|
|
476
469
|
raise ValueError("at least one of do_print and do_capture should be True")
|
|
477
|
-
clear_captured_stdout(clear)
|
|
478
|
-
_do_print = do_print
|
|
479
|
-
_do_capture = do_capture
|
|
480
470
|
|
|
471
|
+
if do_capture:
|
|
472
|
+
if sys.stdout is _org_stdout:
|
|
473
|
+
sys.stdout = handle_capture_stdout()
|
|
474
|
+
_do_print=do_print
|
|
475
|
+
else:
|
|
476
|
+
sys.stdout=_org_stdout
|
|
481
477
|
|
|
482
478
|
if __name__ == "__main__":
|
|
483
479
|
...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{xlwings_utils-0.0.7.post1 → xlwings_utils-0.0.7.post2}/xlwings_utils.egg-info/top_level.txt
RENAMED
|
File without changes
|