nutrient-sdk 1.0.0__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.
- nutrient_sdk/__init__.py +305 -0
- nutrient_sdk/aiaugmentersettings.py +434 -0
- nutrient_sdk/base_exception.py +356 -0
- nutrient_sdk/cadsettings.py +434 -0
- nutrient_sdk/claudeapisettings.py +494 -0
- nutrient_sdk/color.py +152 -0
- nutrient_sdk/contentextractionsettings.py +374 -0
- nutrient_sdk/conversionsettings.py +134 -0
- nutrient_sdk/customvlmapisettings.py +494 -0
- nutrient_sdk/descriptionlevel.py +58 -0
- nutrient_sdk/digitalsignatureoptions.py +582 -0
- nutrient_sdk/document.py +421 -0
- nutrient_sdk/documentformat.py +244 -0
- nutrient_sdk/documentlayoutjsonexportsettings.py +194 -0
- nutrient_sdk/documentmarkupmode.py +61 -0
- nutrient_sdk/documentsettings.py +1012 -0
- nutrient_sdk/documenttype.py +114 -0
- nutrient_sdk/finalizersettings.py +374 -0
- nutrient_sdk/htmlexporter.py +100 -0
- nutrient_sdk/htmllayouttype.py +53 -0
- nutrient_sdk/htmlsettings.py +134 -0
- nutrient_sdk/iexporter.py +20 -0
- nutrient_sdk/imageexporter.py +100 -0
- nutrient_sdk/imageexportformat.py +52 -0
- nutrient_sdk/imagesettingmode.py +58 -0
- nutrient_sdk/imagesettings.py +254 -0
- nutrient_sdk/implicitconversion.py +55 -0
- nutrient_sdk/inferencelayoutsettings.py +134 -0
- nutrient_sdk/internallogic.py +126 -0
- nutrient_sdk/jbig2settings.py +134 -0
- nutrient_sdk/jpegsettings.py +134 -0
- nutrient_sdk/jsonexportcontent.py +55 -0
- nutrient_sdk/jsonexportformat.py +55 -0
- nutrient_sdk/license.py +186 -0
- nutrient_sdk/markdownexporter.py +100 -0
- nutrient_sdk/ocrsettings.py +374 -0
- nutrient_sdk/openaiapiendpointsettings.py +494 -0
- nutrient_sdk/openailanguagesdetectionsettings.py +434 -0
- nutrient_sdk/openaipicturealtsettings.py +434 -0
- nutrient_sdk/opensettings.py +374 -0
- nutrient_sdk/opensettingsmode.py +61 -0
- nutrient_sdk/pagecachemode.py +61 -0
- nutrient_sdk/pdfannotation.py +682 -0
- nutrient_sdk/pdfannotationcollection.py +582 -0
- nutrient_sdk/pdfborderstyle.py +64 -0
- nutrient_sdk/pdfcheckboxfield.py +738 -0
- nutrient_sdk/pdfcircleannotation.py +864 -0
- nutrient_sdk/pdfcomboboxfield.py +720 -0
- nutrient_sdk/pdfcompression.py +70 -0
- nutrient_sdk/pdfconformance.py +118 -0
- nutrient_sdk/pdfeditor.py +269 -0
- nutrient_sdk/pdfexporter.py +100 -0
- nutrient_sdk/pdfformfield.py +563 -0
- nutrient_sdk/pdfformfieldcollection.py +486 -0
- nutrient_sdk/pdfformfieldtype.py +73 -0
- nutrient_sdk/pdffreetextannotation.py +895 -0
- nutrient_sdk/pdfhighlightannotation.py +808 -0
- nutrient_sdk/pdflineannotation.py +1104 -0
- nutrient_sdk/pdflineendingstyle.py +79 -0
- nutrient_sdk/pdflinkannotation.py +783 -0
- nutrient_sdk/pdflistboxfield.py +720 -0
- nutrient_sdk/pdfmarkupannotation.py +820 -0
- nutrient_sdk/pdfmetadata.py +598 -0
- nutrient_sdk/pdfpage.py +219 -0
- nutrient_sdk/pdfpagecollection.py +460 -0
- nutrient_sdk/pdfpagesettings.py +134 -0
- nutrient_sdk/pdfpagesizes.py +397 -0
- nutrient_sdk/pdfpushbuttonfield.py +889 -0
- nutrient_sdk/pdfradiobuttonfield.py +647 -0
- nutrient_sdk/pdfredactannotation.py +868 -0
- nutrient_sdk/pdfrubberstampicon.py +91 -0
- nutrient_sdk/pdfsavepreferences.py +55 -0
- nutrient_sdk/pdfsettings.py +734 -0
- nutrient_sdk/pdfsettingsmode.py +55 -0
- nutrient_sdk/pdfshapeannotation.py +868 -0
- nutrient_sdk/pdfsignaturefield.py +558 -0
- nutrient_sdk/pdfsigner.py +150 -0
- nutrient_sdk/pdfsquareannotation.py +864 -0
- nutrient_sdk/pdfsquigglyannotation.py +808 -0
- nutrient_sdk/pdfstampannotation.py +897 -0
- nutrient_sdk/pdfstrikeoutannotation.py +808 -0
- nutrient_sdk/pdftextannotation.py +986 -0
- nutrient_sdk/pdftextfield.py +889 -0
- nutrient_sdk/pdfunderlineannotation.py +808 -0
- nutrient_sdk/pdfwidgetannotation.py +845 -0
- nutrient_sdk/presentationexporter.py +100 -0
- nutrient_sdk/presentationsettings.py +74 -0
- nutrient_sdk/py.typed +0 -0
- nutrient_sdk/readingordersettings.py +194 -0
- nutrient_sdk/rectf.py +36 -0
- nutrient_sdk/renderinglayoutmode.py +52 -0
- nutrient_sdk/sdk_helpers.py +161 -0
- nutrient_sdk/sdk_loader.py +290 -0
- nutrient_sdk/sdksettings.py +1010 -0
- nutrient_sdk/segmentersettings.py +374 -0
- nutrient_sdk/signatureappearance.py +520 -0
- nutrient_sdk/signaturehashalgorithm.py +58 -0
- nutrient_sdk/spreadsheetexporter.py +100 -0
- nutrient_sdk/spreadsheetsettings.py +914 -0
- nutrient_sdk/svgexporter.py +100 -0
- nutrient_sdk/tablerecognitionsettings.py +134 -0
- nutrient_sdk/textdirection.py +61 -0
- nutrient_sdk/tiffcompression.py +97 -0
- nutrient_sdk/tiffsettings.py +134 -0
- nutrient_sdk/timestampconfiguration.py +280 -0
- nutrient_sdk/unitmode.py +70 -0
- nutrient_sdk/vec2f.py +30 -0
- nutrient_sdk/vision.py +246 -0
- nutrient_sdk/visiondescriptorsettings.py +254 -0
- nutrient_sdk/visionengine.py +58 -0
- nutrient_sdk/visionfeatures.py +70 -0
- nutrient_sdk/visionsettings.py +254 -0
- nutrient_sdk/vlmprovider.py +61 -0
- nutrient_sdk/wordeditor.py +203 -0
- nutrient_sdk/wordexporter.py +100 -0
- nutrient_sdk/wordsdetectionsettings.py +134 -0
- nutrient_sdk/wordsettings.py +194 -0
- nutrient_sdk-1.0.0.dist-info/METADATA +77 -0
- nutrient_sdk-1.0.0.dist-info/RECORD +122 -0
- nutrient_sdk-1.0.0.dist-info/WHEEL +5 -0
- nutrient_sdk-1.0.0.dist-info/licenses/ACKNOWLEDGEMENTS.md +2538 -0
- nutrient_sdk-1.0.0.dist-info/top_level.txt +1 -0
nutrient_sdk/__init__.py
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
"""Nutrient SDK for Python."""
|
|
2
|
+
|
|
3
|
+
__version__ = "1.0.0"
|
|
4
|
+
__author__ = "Nutrient"
|
|
5
|
+
__license__ = "Commercial"
|
|
6
|
+
|
|
7
|
+
from .base_exception import (
|
|
8
|
+
NutrientException,
|
|
9
|
+
SDKError,
|
|
10
|
+
InitializationError,
|
|
11
|
+
LicenseError,
|
|
12
|
+
DocumentError,
|
|
13
|
+
ConversionError,
|
|
14
|
+
ValidationError,
|
|
15
|
+
IOError,
|
|
16
|
+
MemoryError,
|
|
17
|
+
TimeoutError,
|
|
18
|
+
NotImplementedError,
|
|
19
|
+
PermissionError,
|
|
20
|
+
ErrorInfo,
|
|
21
|
+
handle_native_error
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
from .iexporter import IExporter, IExporterBase
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
from .sdksettings import SdkSettings
|
|
28
|
+
from .license import License
|
|
29
|
+
from .internallogic import InternalLogic
|
|
30
|
+
from .document import Document
|
|
31
|
+
from .digitalsignatureoptions import DigitalSignatureOptions
|
|
32
|
+
from .pdfsigner import PdfSigner
|
|
33
|
+
from .signatureappearance import SignatureAppearance
|
|
34
|
+
from .timestampconfiguration import TimestampConfiguration
|
|
35
|
+
from .htmlexporter import HtmlExporter
|
|
36
|
+
from .imageexporter import ImageExporter
|
|
37
|
+
from .markdownexporter import MarkdownExporter
|
|
38
|
+
from .pdfexporter import PdfExporter
|
|
39
|
+
from .presentationexporter import PresentationExporter
|
|
40
|
+
from .spreadsheetexporter import SpreadsheetExporter
|
|
41
|
+
from .svgexporter import SvgExporter
|
|
42
|
+
from .wordexporter import WordExporter
|
|
43
|
+
from .pdfeditor import PdfEditor
|
|
44
|
+
from .wordeditor import WordEditor
|
|
45
|
+
from .pdfpage import PdfPage
|
|
46
|
+
from .pdfpagecollection import PdfPageCollection
|
|
47
|
+
from .pdfcheckboxfield import PdfCheckBoxField
|
|
48
|
+
from .pdfformfield import PdfFormField
|
|
49
|
+
from .pdfcomboboxfield import PdfComboBoxField
|
|
50
|
+
from .pdfformfieldcollection import PdfFormFieldCollection
|
|
51
|
+
from .pdflistboxfield import PdfListBoxField
|
|
52
|
+
from .pdfpushbuttonfield import PdfPushButtonField
|
|
53
|
+
from .pdfradiobuttonfield import PdfRadioButtonField
|
|
54
|
+
from .pdfsignaturefield import PdfSignatureField
|
|
55
|
+
from .pdftextfield import PdfTextField
|
|
56
|
+
from .pdfannotation import PdfAnnotation
|
|
57
|
+
from .pdfannotationcollection import PdfAnnotationCollection
|
|
58
|
+
from .pdflinkannotation import PdfLinkAnnotation
|
|
59
|
+
from .pdfmarkupannotation import PdfMarkupAnnotation
|
|
60
|
+
from .pdffreetextannotation import PdfFreeTextAnnotation
|
|
61
|
+
from .pdfwidgetannotation import PdfWidgetAnnotation
|
|
62
|
+
from .pdfstampannotation import PdfStampAnnotation
|
|
63
|
+
from .pdfredactannotation import PdfRedactAnnotation
|
|
64
|
+
from .pdfshapeannotation import PdfShapeAnnotation
|
|
65
|
+
from .pdflineannotation import PdfLineAnnotation
|
|
66
|
+
from .pdfcircleannotation import PdfCircleAnnotation
|
|
67
|
+
from .pdfsquareannotation import PdfSquareAnnotation
|
|
68
|
+
from .pdftextannotation import PdfTextAnnotation
|
|
69
|
+
from .pdfhighlightannotation import PdfHighlightAnnotation
|
|
70
|
+
from .pdfunderlineannotation import PdfUnderlineAnnotation
|
|
71
|
+
from .pdfstrikeoutannotation import PdfStrikeOutAnnotation
|
|
72
|
+
from .pdfsquigglyannotation import PdfSquigglyAnnotation
|
|
73
|
+
from .vision import Vision
|
|
74
|
+
from .color import Color
|
|
75
|
+
from .aiaugmentersettings import AiAugmenterSettings
|
|
76
|
+
from .cadsettings import CadSettings
|
|
77
|
+
from .documentsettings import DocumentSettings
|
|
78
|
+
from .claudeapisettings import ClaudeApiSettings
|
|
79
|
+
from .pdfmetadata import PdfMetadata
|
|
80
|
+
from .contentextractionsettings import ContentExtractionSettings
|
|
81
|
+
from .documentlayoutjsonexportsettings import DocumentLayoutJsonExportSettings
|
|
82
|
+
from .conversionsettings import ConversionSettings
|
|
83
|
+
from .customvlmapisettings import CustomVlmApiSettings
|
|
84
|
+
from .finalizersettings import FinalizerSettings
|
|
85
|
+
from .htmlsettings import HtmlSettings
|
|
86
|
+
from .imagesettings import ImageSettings
|
|
87
|
+
from .inferencelayoutsettings import InferenceLayoutSettings
|
|
88
|
+
from .jbig2settings import Jbig2Settings
|
|
89
|
+
from .jpegsettings import JpegSettings
|
|
90
|
+
from .ocrsettings import OcrSettings
|
|
91
|
+
from .openaiapiendpointsettings import OpenAIApiEndpointSettings
|
|
92
|
+
from .openailanguagesdetectionsettings import OpenAILanguagesDetectionSettings
|
|
93
|
+
from .openaipicturealtsettings import OpenAIPictureAltSettings
|
|
94
|
+
from .opensettings import OpenSettings
|
|
95
|
+
from .pdfpagesettings import PdfPageSettings
|
|
96
|
+
from .pdfsettings import PdfSettings
|
|
97
|
+
from .presentationsettings import PresentationSettings
|
|
98
|
+
from .readingordersettings import ReadingOrderSettings
|
|
99
|
+
from .segmentersettings import SegmenterSettings
|
|
100
|
+
from .spreadsheetsettings import SpreadsheetSettings
|
|
101
|
+
from .tablerecognitionsettings import TableRecognitionSettings
|
|
102
|
+
from .tiffsettings import TiffSettings
|
|
103
|
+
from .visiondescriptorsettings import VisionDescriptorSettings
|
|
104
|
+
from .visionsettings import VisionSettings
|
|
105
|
+
from .wordsdetectionsettings import WordsDetectionSettings
|
|
106
|
+
from .wordsettings import WordSettings
|
|
107
|
+
|
|
108
|
+
from .pdfpagesizes import PdfPageSizes
|
|
109
|
+
from .renderinglayoutmode import RenderingLayoutMode
|
|
110
|
+
from .pdfformfieldtype import PdfFormFieldType
|
|
111
|
+
from .unitmode import UnitMode
|
|
112
|
+
from .documenttype import DocumentType
|
|
113
|
+
from .signaturehashalgorithm import SignatureHashAlgorithm
|
|
114
|
+
from .jsonexportcontent import JsonExportContent
|
|
115
|
+
from .jsonexportformat import JsonExportFormat
|
|
116
|
+
from .tiffcompression import TiffCompression
|
|
117
|
+
from .descriptionlevel import DescriptionLevel
|
|
118
|
+
from .pdfborderstyle import PdfBorderStyle
|
|
119
|
+
from .vlmprovider import VlmProvider
|
|
120
|
+
from .visionfeatures import VisionFeatures
|
|
121
|
+
from .visionengine import VisionEngine
|
|
122
|
+
from .documentmarkupmode import DocumentMarkupMode
|
|
123
|
+
from .textdirection import TextDirection
|
|
124
|
+
from .pdfrubberstampicon import PdfRubberStampIcon
|
|
125
|
+
from .pagecachemode import PageCacheMode
|
|
126
|
+
from .opensettingsmode import OpenSettingsMode
|
|
127
|
+
from .documentformat import DocumentFormat
|
|
128
|
+
from .implicitconversion import ImplicitConversion
|
|
129
|
+
from .pdfconformance import PdfConformance
|
|
130
|
+
from .pdfsettingsmode import PdfSettingsMode
|
|
131
|
+
from .pdfsavepreferences import PdfSavePreferences
|
|
132
|
+
from .pdfcompression import PdfCompression
|
|
133
|
+
from .pdflineendingstyle import PdfLineEndingStyle
|
|
134
|
+
from .htmllayouttype import HtmlLayoutType
|
|
135
|
+
from .imagesettingmode import ImageSettingMode
|
|
136
|
+
from .imageexportformat import ImageExportFormat
|
|
137
|
+
|
|
138
|
+
from .sdk_loader import (
|
|
139
|
+
initialize_sdk,
|
|
140
|
+
shutdown_sdk,
|
|
141
|
+
get_sdk_version,
|
|
142
|
+
is_sdk_initialized,
|
|
143
|
+
SDKError
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
__all__ = [
|
|
147
|
+
'initialize_sdk',
|
|
148
|
+
'shutdown_sdk',
|
|
149
|
+
'get_sdk_version',
|
|
150
|
+
'is_sdk_initialized',
|
|
151
|
+
'NutrientException',
|
|
152
|
+
'SDKError',
|
|
153
|
+
'InitializationError',
|
|
154
|
+
'LicenseError',
|
|
155
|
+
'DocumentError',
|
|
156
|
+
'ConversionError',
|
|
157
|
+
'ValidationError',
|
|
158
|
+
'IOError',
|
|
159
|
+
'MemoryError',
|
|
160
|
+
'TimeoutError',
|
|
161
|
+
'NotImplementedError',
|
|
162
|
+
'PermissionError',
|
|
163
|
+
'ErrorInfo',
|
|
164
|
+
'handle_native_error',
|
|
165
|
+
'IExporter',
|
|
166
|
+
'IExporterBase',
|
|
167
|
+
'SdkSettings',
|
|
168
|
+
'License',
|
|
169
|
+
'InternalLogic',
|
|
170
|
+
'Document',
|
|
171
|
+
'DigitalSignatureOptions',
|
|
172
|
+
'PdfSigner',
|
|
173
|
+
'SignatureAppearance',
|
|
174
|
+
'TimestampConfiguration',
|
|
175
|
+
'HtmlExporter',
|
|
176
|
+
'ImageExporter',
|
|
177
|
+
'MarkdownExporter',
|
|
178
|
+
'PdfExporter',
|
|
179
|
+
'PresentationExporter',
|
|
180
|
+
'SpreadsheetExporter',
|
|
181
|
+
'SvgExporter',
|
|
182
|
+
'WordExporter',
|
|
183
|
+
'PdfEditor',
|
|
184
|
+
'WordEditor',
|
|
185
|
+
'PdfPage',
|
|
186
|
+
'PdfPageCollection',
|
|
187
|
+
'PdfCheckBoxField',
|
|
188
|
+
'PdfFormField',
|
|
189
|
+
'PdfComboBoxField',
|
|
190
|
+
'PdfFormFieldCollection',
|
|
191
|
+
'PdfListBoxField',
|
|
192
|
+
'PdfPushButtonField',
|
|
193
|
+
'PdfRadioButtonField',
|
|
194
|
+
'PdfSignatureField',
|
|
195
|
+
'PdfTextField',
|
|
196
|
+
'PdfAnnotation',
|
|
197
|
+
'PdfAnnotationCollection',
|
|
198
|
+
'PdfLinkAnnotation',
|
|
199
|
+
'PdfMarkupAnnotation',
|
|
200
|
+
'PdfFreeTextAnnotation',
|
|
201
|
+
'PdfWidgetAnnotation',
|
|
202
|
+
'PdfStampAnnotation',
|
|
203
|
+
'PdfRedactAnnotation',
|
|
204
|
+
'PdfShapeAnnotation',
|
|
205
|
+
'PdfLineAnnotation',
|
|
206
|
+
'PdfCircleAnnotation',
|
|
207
|
+
'PdfSquareAnnotation',
|
|
208
|
+
'PdfTextAnnotation',
|
|
209
|
+
'PdfHighlightAnnotation',
|
|
210
|
+
'PdfUnderlineAnnotation',
|
|
211
|
+
'PdfStrikeOutAnnotation',
|
|
212
|
+
'PdfSquigglyAnnotation',
|
|
213
|
+
'Vision',
|
|
214
|
+
'Color',
|
|
215
|
+
'AiAugmenterSettings',
|
|
216
|
+
'CadSettings',
|
|
217
|
+
'DocumentSettings',
|
|
218
|
+
'ClaudeApiSettings',
|
|
219
|
+
'PdfMetadata',
|
|
220
|
+
'ContentExtractionSettings',
|
|
221
|
+
'DocumentLayoutJsonExportSettings',
|
|
222
|
+
'ConversionSettings',
|
|
223
|
+
'CustomVlmApiSettings',
|
|
224
|
+
'FinalizerSettings',
|
|
225
|
+
'HtmlSettings',
|
|
226
|
+
'ImageSettings',
|
|
227
|
+
'InferenceLayoutSettings',
|
|
228
|
+
'Jbig2Settings',
|
|
229
|
+
'JpegSettings',
|
|
230
|
+
'OcrSettings',
|
|
231
|
+
'OpenAIApiEndpointSettings',
|
|
232
|
+
'OpenAILanguagesDetectionSettings',
|
|
233
|
+
'OpenAIPictureAltSettings',
|
|
234
|
+
'OpenSettings',
|
|
235
|
+
'PdfPageSettings',
|
|
236
|
+
'PdfSettings',
|
|
237
|
+
'PresentationSettings',
|
|
238
|
+
'ReadingOrderSettings',
|
|
239
|
+
'SegmenterSettings',
|
|
240
|
+
'SpreadsheetSettings',
|
|
241
|
+
'TableRecognitionSettings',
|
|
242
|
+
'TiffSettings',
|
|
243
|
+
'VisionDescriptorSettings',
|
|
244
|
+
'VisionSettings',
|
|
245
|
+
'WordsDetectionSettings',
|
|
246
|
+
'WordSettings',
|
|
247
|
+
'PdfPageSizes',
|
|
248
|
+
'RenderingLayoutMode',
|
|
249
|
+
'PdfFormFieldType',
|
|
250
|
+
'UnitMode',
|
|
251
|
+
'DocumentType',
|
|
252
|
+
'SignatureHashAlgorithm',
|
|
253
|
+
'JsonExportContent',
|
|
254
|
+
'JsonExportFormat',
|
|
255
|
+
'TiffCompression',
|
|
256
|
+
'DescriptionLevel',
|
|
257
|
+
'PdfBorderStyle',
|
|
258
|
+
'VlmProvider',
|
|
259
|
+
'VisionFeatures',
|
|
260
|
+
'VisionEngine',
|
|
261
|
+
'DocumentMarkupMode',
|
|
262
|
+
'TextDirection',
|
|
263
|
+
'PdfRubberStampIcon',
|
|
264
|
+
'PageCacheMode',
|
|
265
|
+
'OpenSettingsMode',
|
|
266
|
+
'DocumentFormat',
|
|
267
|
+
'ImplicitConversion',
|
|
268
|
+
'PdfConformance',
|
|
269
|
+
'PdfSettingsMode',
|
|
270
|
+
'PdfSavePreferences',
|
|
271
|
+
'PdfCompression',
|
|
272
|
+
'PdfLineEndingStyle',
|
|
273
|
+
'HtmlLayoutType',
|
|
274
|
+
'ImageSettingMode',
|
|
275
|
+
'ImageExportFormat',
|
|
276
|
+
]
|
|
277
|
+
|
|
278
|
+
_initialized = False
|
|
279
|
+
|
|
280
|
+
def _auto_initialize():
|
|
281
|
+
global _initialized
|
|
282
|
+
if not _initialized:
|
|
283
|
+
try:
|
|
284
|
+
initialize_sdk()
|
|
285
|
+
_initialized = True
|
|
286
|
+
except SDKError as e:
|
|
287
|
+
import warnings
|
|
288
|
+
warnings.warn(f"Failed to auto-initialize Nutrient SDK: {e}", RuntimeWarning)
|
|
289
|
+
|
|
290
|
+
import os
|
|
291
|
+
if not os.environ.get('NUTRIENT_NO_AUTO_INIT'):
|
|
292
|
+
_auto_initialize()
|
|
293
|
+
|
|
294
|
+
import atexit
|
|
295
|
+
|
|
296
|
+
def _cleanup():
|
|
297
|
+
global _initialized
|
|
298
|
+
if _initialized:
|
|
299
|
+
try:
|
|
300
|
+
shutdown_sdk()
|
|
301
|
+
_initialized = False
|
|
302
|
+
except:
|
|
303
|
+
pass # Ignore errors during cleanup
|
|
304
|
+
|
|
305
|
+
atexit.register(_cleanup)
|