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']

댓글

  1. 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();
    }
    }
    }

    답글삭제

댓글 쓰기

이 블로그의 인기 게시물

2D FFT of Gray Image by AForge

Draw Circle on PictureBox when Button Click - Winform