Denis Akhiyarov
2014-10-06 13:45:13 UTC
Is there any way to import the same Python module as multiple instances,
e.g. for each instance of C# class/object? For now it looks like the same
module is imported for each instance of C# object (essentially a static
Python object) when I do this:
using (Py.GIL())
{
dynamic syspy = Py.Import("sys");
syspy.path.append(ConfigDirectory);
mymodulepy= Py.Import("mymodulepy");
}
e.g. for each instance of C# class/object? For now it looks like the same
module is imported for each instance of C# object (essentially a static
Python object) when I do this:
using (Py.GIL())
{
dynamic syspy = Py.Import("sys");
syspy.path.append(ConfigDirectory);
mymodulepy= Py.Import("mymodulepy");
}