I used the search engine. I couldn't find the thing I want,and i'm not that good in programming.I have a .py script that use hashlib and M2Crypto,and when i use iron python to run the program from c# it says that no module named hashlib. I couldn't find a way to import hashlib to c# or ironpython even tho i searched all the net, i tried the following code it doesn't seem to work too. Can you help please thanks.
Process p = new Process(); // create process (i.e., the python program
GetShortPathName(decdbpath, shortPath, shortPath.Capacity);
GetShortPathName(db, shortPath2, shortPath2.Capacity);
p.StartInfo.FileName = "C:\\Python27\\python.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.Arguments = a+"\\pycode.py" + shortPath + " " +
txt_entermail.Text + " >" + db;
p.Start(); // start the process (the python program)
p.WaitForExit();
MessageBox.Show("Decryption Done");
finally i found the problem, the path to the py script contained a space i fixed the problem, but now python script is refusing to take the arguments ? thanks
string format = string.Format(shortPath + "\\pycode.py"+" "+shortPath2.ToString() + " " + txt_entermail.Text + " > " + shortPath3.ToString());
this is the result:
usage C:\Users\win7\Ziad\MOBILE~1\DBEXPL~1\WINDOW~1\bin\Debug\pycode.py argument1 argument2 > argument3