Run python script in Winform
Hello from Python
Call Dir():
[]
Print the Path:
['.', 'c:\\users\\bemor\\source\\repos\\wfIronPy1\\wfIronPy1\\bin\\Debug\\Lib', 'c:\\users\\bemor\\source\\repos\\wfIronPy1\\wfIronPy1\\bin\\Debug\\DLLs']
Call Dir():
[]
Print the Path:
['.', 'c:\\users\\bemor\\source\\repos\\wfIronPy1\\wfIronPy1\\bin\\Debug\\Lib', 'c:\\users\\bemor\\source\\repos\\wfIronPy1\\wfIronPy1\\bin\\Debug\\DLLs']
using System;
답글삭제using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using IronPython.Hosting; // ************
using Microsoft.Scripting.Hosting; // ************
namespace wfIronPy1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//---------------------------------------------------------------------
private void Form1_Load(object sender, EventArgs e)
{
var ipy = Python.CreateRuntime();
dynamic test1 = ipy.UseFile("test.py");
test1.Simple();
}
}
}