שימוש ב- python מתוך vb
האם יש דרך פשוטה להפעיל פקודות של python מ- VB ? (כלומר-דרך שלא דורשת כתיבת אפליקציה נוספת שתעטוף את ה python) ניסיתי בדרך הבאה (ע"י redirection של stdin/out), אבל היא לא עבדה- מישהו יודע למה?
האם יש דרך פשוטה להפעיל פקודות של python מ- VB ? (כלומר-דרך שלא דורשת כתיבת אפליקציה נוספת שתעטוף את ה python) ניסיתי בדרך הבאה (ע"י redirection של stdin/out), אבל היא לא עבדה- מישהו יודע למה?
Dim myProcess As New Process myProcess.StartInfo.FileName = "C:/python24/python.exe" myProcess.StartInfo.UseShellExecute = False myProcess.StartInfo.RedirectStandardInput = True myProcess.StartInfo.RedirectStandardOutput = True myProcess.StartInfo.RedirectStandardError = True myProcess.Start() Dim m_pythonReader As System.IO.StreamReader = myProcess.StandardOutput Dim m_pythonWriter As System.IO.StreamWriter = myProcess.StandardInput Dim m_pythonErr As System.IO.StreamReader = myProcess.StandardError m_pythonWriter.WriteLine("print ""helloWorld"" ") Dim l As String = m_pythonReader.ReadLine()
תודה.