iris-pex-embedded-python 3.5.1b2__tar.gz → 3.5.1b3__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 iris-pex-embedded-python might be problematic. Click here for more details.
- {iris_pex_embedded_python-3.5.1b2/src/iris_pex_embedded_python.egg-info → iris_pex_embedded_python-3.5.1b3}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/pyproject.toml +1 -1
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_debugpy.py +43 -1
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Common.cls +66 -45
- iris_pex_embedded_python-3.5.1b3/src/iop/cls/IOP/Wrapper.cls +58 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3/src/iris_pex_embedded_python.egg-info}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +1 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/LICENSE +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/README.md +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/setup.cfg +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/setup.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/__main__.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_business_host.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_cli.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_common.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_director.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_utils.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/__main__.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_async_request.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_host.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_operation.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_process.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_service.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_cli.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_common.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_decorators.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_director.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_dispatch.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_generator_request.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_inbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_iris.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_log_manager.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_message.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_message_validator.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_outbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_private_session_duplex.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_private_session_process.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_serialization.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_utils.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Utils.cls +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
|
@@ -142,4 +142,46 @@ def debugpython(self, host_object: Any) -> None:
|
|
|
142
142
|
else:
|
|
143
143
|
self.log_alert(f"Debugpy connection timed out after {host_object._timeout} seconds")
|
|
144
144
|
except Exception as e:
|
|
145
|
-
self.log_alert(f"Error enabling debugpy: {e}")
|
|
145
|
+
self.log_alert(f"Error enabling debugpy: {e}")
|
|
146
|
+
|
|
147
|
+
def debugpy_in_iris(iris_dir, port) -> bool:
|
|
148
|
+
|
|
149
|
+
if not hasattr(os, '__file__'):
|
|
150
|
+
setattr(os, '__file__', __file__)
|
|
151
|
+
|
|
152
|
+
if not is_debugpy_installed():
|
|
153
|
+
print("debugpy is not installed.")
|
|
154
|
+
return False
|
|
155
|
+
if not iris_dir:
|
|
156
|
+
print("IRIS directory is not specified.")
|
|
157
|
+
return False
|
|
158
|
+
|
|
159
|
+
import debugpy
|
|
160
|
+
python_path = _get_python_interpreter_path(mgr_dir_to_install_dir(iris_dir))
|
|
161
|
+
if not python_path:
|
|
162
|
+
return False
|
|
163
|
+
debugpy.configure(_get_debugpy_config(python_path))
|
|
164
|
+
|
|
165
|
+
try:
|
|
166
|
+
enable_debugpy(port=port)
|
|
167
|
+
except Exception as e:
|
|
168
|
+
print(f"Failed to enable debugpy: {e}")
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
print(f"Debugpy is waiting for connection on port {port}...")
|
|
172
|
+
if wait_for_debugpy_connected(timeout=30, port=port):
|
|
173
|
+
print(f"Debugpy is connected on port {port}")
|
|
174
|
+
return True
|
|
175
|
+
else:
|
|
176
|
+
print(f"Debugpy connection timed out after 30 seconds on port {port}")
|
|
177
|
+
return False
|
|
178
|
+
|
|
179
|
+
def mgr_dir_to_install_dir(mgr_dir: str) -> Optional[str]:
|
|
180
|
+
"""Convert manager directory to install directory."""
|
|
181
|
+
import os
|
|
182
|
+
if not mgr_dir:
|
|
183
|
+
return None
|
|
184
|
+
install_dir = os.path.dirname(os.path.dirname(mgr_dir))
|
|
185
|
+
if os.path.exists(install_dir):
|
|
186
|
+
return install_dir
|
|
187
|
+
return None
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Common.cls
RENAMED
|
@@ -164,58 +164,22 @@ Method Connect() As %Status
|
|
|
164
164
|
{
|
|
165
165
|
set tSC = $$$OK
|
|
166
166
|
try {
|
|
167
|
+
// Initialize Python class instance
|
|
168
|
+
$$$ThrowOnError(..InitializePythonClass())
|
|
167
169
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
set moduleName = ..%module
|
|
173
|
-
set module = sys.modules.get(moduleName, $$$NULLOREF)
|
|
174
|
-
if $isObject(module) {
|
|
175
|
-
$$$LOGINFO("Module "_moduleName_" is already imported in sys.modules")
|
|
176
|
-
// If the module is already present, we can skip the import
|
|
177
|
-
set builtins = ##class(%SYS.Python).Import("builtins")
|
|
178
|
-
set class = builtins.getattr(module, ..%classname)
|
|
179
|
-
set ..%class = class."__new__"(class)
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
|
|
183
|
-
//set classpass
|
|
184
|
-
if ..%classpaths '="" {
|
|
185
|
-
set delimiter = $s($system.Version.GetOS()="Windows":";",1:":")
|
|
186
|
-
set extraClasspaths = $tr(container.%classpaths,delimiter,"|")
|
|
187
|
-
for i=1:1:$l(extraClasspaths,"|") {
|
|
188
|
-
set onePath = $p(extraClasspaths,"|",i)
|
|
189
|
-
set onePath = ##class(%File).NormalizeDirectory(onePath)
|
|
190
|
-
do ..SetPythonPath(onePath)
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if $isObject(..%class)=0 {
|
|
195
|
-
set builtins = ##class(%SYS.Python).Import("builtins")
|
|
196
|
-
set module = ##class(%SYS.Python).Import(..%module)
|
|
197
|
-
set class = builtins.getattr(module, ..%classname)
|
|
198
|
-
set ..%class = class."__new__"(class)
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
;
|
|
203
|
-
if ..%Extends("IOP.InboundAdapter") || ..%Extends("IOP.OutboundAdapter") {
|
|
204
|
-
do ..%class."_set_iris_handles"($this,..BusinessHost)
|
|
205
|
-
} elseif $this.%Extends("IOP.BusinessProcess") {
|
|
206
|
-
do ..%class."_set_iris_handles"($this,$$$NULLOREF)
|
|
207
|
-
} else {
|
|
208
|
-
do ..%class."_set_iris_handles"($this,..Adapter)
|
|
209
|
-
}
|
|
210
|
-
;
|
|
170
|
+
// Set IRIS handles based on component type
|
|
171
|
+
do ..SetIrisHandles()
|
|
172
|
+
|
|
173
|
+
// Apply property values to Python instance
|
|
211
174
|
do ..SetPropertyValues()
|
|
212
|
-
|
|
175
|
+
|
|
176
|
+
// Notify Python class of connection
|
|
213
177
|
try {
|
|
214
178
|
do ..%class."_dispatch_on_connected"($this)
|
|
215
179
|
} catch ex {
|
|
216
180
|
$$$LOGWARNING(ex.DisplayString())
|
|
217
181
|
}
|
|
218
|
-
|
|
182
|
+
|
|
219
183
|
} catch ex {
|
|
220
184
|
set msg = $System.Status.GetOneStatusText(ex.AsStatus(),1)
|
|
221
185
|
set tSC = $$$ERROR($$$EnsErrGeneral,msg)
|
|
@@ -545,4 +509,61 @@ Method OnMsgGeneratorPoll(
|
|
|
545
509
|
quit tSC
|
|
546
510
|
}
|
|
547
511
|
|
|
512
|
+
Method InitializePythonClass() As %Status [ Private ]
|
|
513
|
+
{
|
|
514
|
+
set tSC = $$$OK
|
|
515
|
+
try {
|
|
516
|
+
// Check if module is already imported
|
|
517
|
+
set sys = ##class(%SYS.Python).Import("sys")
|
|
518
|
+
set module = sys.modules.get(..%module, $$$NULLOREF)
|
|
519
|
+
|
|
520
|
+
if $isObject(module) {
|
|
521
|
+
$$$LOGINFO("Module "_..%module_" is already imported in sys.modules")
|
|
522
|
+
set ..%class = ..CreateClassInstance(module)
|
|
523
|
+
} else {
|
|
524
|
+
// Setup classpaths if specified
|
|
525
|
+
if ..%classpaths '= "" {
|
|
526
|
+
do ..SetupClasspaths()
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Import module and create class instance
|
|
530
|
+
set module = ##class(%SYS.Python).Import(..%module)
|
|
531
|
+
set ..%class = ..CreateClassInstance(module)
|
|
532
|
+
}
|
|
533
|
+
} catch ex {
|
|
534
|
+
set tSC = ex.AsStatus()
|
|
535
|
+
}
|
|
536
|
+
quit tSC
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
Method CreateClassInstance(module As %SYS.Python) As %SYS.Python [ Private ]
|
|
540
|
+
{
|
|
541
|
+
set builtins = ##class(%SYS.Python).Import("builtins")
|
|
542
|
+
set class = builtins.getattr(module, ..%classname)
|
|
543
|
+
quit class."__new__"(class)
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
Method SetupClasspaths() [ Private ]
|
|
547
|
+
{
|
|
548
|
+
set delimiter = $s($system.Version.GetOS()="Windows":";",1:":")
|
|
549
|
+
set extraClasspaths = $tr(..%classpaths, delimiter, "|")
|
|
550
|
+
|
|
551
|
+
for i=1:1:$l(extraClasspaths,"|") {
|
|
552
|
+
set onePath = $p(extraClasspaths,"|",i)
|
|
553
|
+
set onePath = ##class(%File).NormalizeDirectory(onePath)
|
|
554
|
+
do ..SetPythonPath(onePath)
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
Method SetIrisHandles() [ Private ]
|
|
559
|
+
{
|
|
560
|
+
if ..%Extends("IOP.InboundAdapter") || ..%Extends("IOP.OutboundAdapter") {
|
|
561
|
+
do ..%class."_set_iris_handles"($this, ..BusinessHost)
|
|
562
|
+
} elseif $this.%Extends("IOP.BusinessProcess") {
|
|
563
|
+
do ..%class."_set_iris_handles"($this, $$$NULLOREF)
|
|
564
|
+
} else {
|
|
565
|
+
do ..%class."_set_iris_handles"($this, ..Adapter)
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
548
569
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Class IOP.Wrapper Extends %RegisteredObject
|
|
2
|
+
{
|
|
3
|
+
|
|
4
|
+
ClassMethod Import(
|
|
5
|
+
moduleName As %String,
|
|
6
|
+
path As %String = "",
|
|
7
|
+
debugPort As %Integer = 0) As %Status
|
|
8
|
+
{
|
|
9
|
+
set tSC = $$$OK
|
|
10
|
+
Try {
|
|
11
|
+
do ##class(IOP.Common).SetPythonPath(path)
|
|
12
|
+
// For traceback debugging
|
|
13
|
+
do $system.Python.Debugging(1)
|
|
14
|
+
if debugPort > 0 {
|
|
15
|
+
|
|
16
|
+
set debugpy = ##class(%SYS.Python).Import("iop._debugpy")
|
|
17
|
+
do debugpy."debugpy_in_iris"($zu(12),debugPort)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Import the module
|
|
21
|
+
set tModule = ##class(%SYS.Python).Import(moduleName)
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
Catch ex {
|
|
25
|
+
Set tSC= ##class(IOP.Wrapper).DisplayTraceback(ex)
|
|
26
|
+
throw ex
|
|
27
|
+
}
|
|
28
|
+
return tModule
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ClassMethod DisplayTraceback(ex) As %Status
|
|
32
|
+
{
|
|
33
|
+
set tSC = ex.AsStatus()
|
|
34
|
+
|
|
35
|
+
// Import Modules
|
|
36
|
+
set sys = ##class(%SYS.Python).Import("sys")
|
|
37
|
+
set tracebackModule = ##class(%SYS.Python).Import("traceback")
|
|
38
|
+
set builtins = ##class(%SYS.Python).Import("builtins")
|
|
39
|
+
// Get the last traceback
|
|
40
|
+
set traceback = sys."last_traceback"
|
|
41
|
+
set exType = sys."last_type"."__name__"
|
|
42
|
+
set exValue = sys."last_value"."__str__"()
|
|
43
|
+
// Check if traceback is an object
|
|
44
|
+
if $isObject(traceback) {
|
|
45
|
+
// Format the traceback
|
|
46
|
+
set tb = tracebackModule."format_exception"(sys."last_type", sys."last_value", traceback)
|
|
47
|
+
set tbString = ""
|
|
48
|
+
for i=0:1:(tb."__len__"()-1) {
|
|
49
|
+
set tbString = tbString _ $c(10)_$c(13) _ tb."__getitem__"(i)
|
|
50
|
+
}
|
|
51
|
+
w tbString
|
|
52
|
+
set tSC = $$$ERROR("Exception in Python - "_exType_" - "_exValue)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return tSC
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
|
@@ -66,6 +66,7 @@ src/iop/cls/IOP/OutboundAdapter.cls
|
|
|
66
66
|
src/iop/cls/IOP/PickleMessage.cls
|
|
67
67
|
src/iop/cls/IOP/Test.cls
|
|
68
68
|
src/iop/cls/IOP/Utils.cls
|
|
69
|
+
src/iop/cls/IOP/Wrapper.cls
|
|
69
70
|
src/iop/cls/IOP/Duplex/Operation.cls
|
|
70
71
|
src/iop/cls/IOP/Duplex/Process.cls
|
|
71
72
|
src/iop/cls/IOP/Duplex/Service.cls
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/__init__.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_cli.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_common.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_director.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/grongier/pex/_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_async_request.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_host.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_operation.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_process.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_business_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_generator_request.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_inbound_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_log_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_message_validator.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_outbound_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/_serialization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Director.cls
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Message.cls
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Test.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/cls/IOP/Utils.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.1b2 → iris_pex_embedded_python-3.5.1b3}/src/iop/wsgi/handlers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|