I would like to import another script file inside a script file which both are in Ironpython.
For example:
`filename = "C:\test.py"
import filename`
And I got an error said:
IronPython.Runtime.Exceptions.ImportException: No module named filename
Could you tell me how to import a module if it is put into a variable?
Of course I know, there is no any problem if I write it like following:
import test
But it is necessary that the module is immutable, which is actually not in my case.
This is actually standard Python – the
__import__function is what you want.