I am calling a python script that uses imaplib.py and get the "no module named fcntl" error. From searching I found that this module is only available in unix and so I wonder if the py script is confused about what os it is running under. Again, script works fine under windows run directly from the python directory.
var engine = Python.CreateEngine();
ScriptScope scope = engine.CreateScope();
var ops = engine.Operations;
var script = engine.CreateScriptSourceFromFile("PyTest.py");
CompiledCode code = script.Compile();
//string scode = script.GetCode();
code.Execute(scope);
and the minimal py script to trigger it. Note that commenting out the import imaplib.py line will stop the error.
import sys
sys.path = ["Python\Lib"]
sys.platform = ["win32"]
import os
import os
import getopt
import getpass
import time
import imaplib
I traced it a bit to the subprocess.py that imaplib.py uses, there I noticed the sys.platform variable and tried setting it to win32 as above but made no difference. Something is different between the ironpython calling environment and the windows command prompt from the cpython folder.