This code here runs only if cli.py is imported:
|
# Increase CSV field size limit to maximum possible |
|
# https://stackoverflow.com/a/15063941 |
|
field_size_limit = sys.maxsize |
|
|
|
while True: |
|
try: |
|
csv_std.field_size_limit(field_size_limit) |
|
break |
|
except OverflowError: |
|
field_size_limit = int(field_size_limit / 10) |
I found myself needing the same fix in another library:
It should be a documented utility function.
This code here runs only if
cli.pyis imported:sqlite-utils/sqlite_utils/cli.py
Lines 50 to 59 in 7ddf530
I found myself needing the same fix in another library:
It should be a documented utility function.