This article explains how to import an external Python module using IronPython Script into Spotfire® without deploying to the Spotfire® server.
Introduction
This article describes about how to import an external Python module using IronPython Script into Spotfire® without deploying to the Spotfire® server.
- Create a folder named MyPythonModule.
- Create a sample file "mymodule.py" in the above folder.
Python Module
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. # Python Module name "mymodule.py" to import into Spotfire. def hello(string): #return "Hello %s!" % (string,) print ('Hello ' + string )
IronPython Script
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. #IronPython Script to import an external Python module "mymodule.py" into Spotfire. import sys sys.path.append(r'D:MyPythonModule') from mymodule import hello x= hello("world");
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.