Importing custom python module into scripted extension

talmazov
Sat, 23 May 2020 03:27:56 +0000
Development

Hey all,
I have a custom python file asyncsocket.py that contains some code independent of 3d slicer. I am trying to import that module to use in a scripted widged by doing
import asyncsocket
howeveri get this
RuntimeError: qSlicerScriptedLoadableModule::setPythonSourc
apperently it is not a scripted loadable module. this is a generic python code that utilizes only core python function
asyncsocket.py is in the same directory as the slicer scripted widget

Thanks!

4 posts - 3 participants