title: C# WPF + Python
body: <p>Can you tell me, please, what is more correct way to use Python in conjunction with C# WPF? I have come across many Python implementations and I confused about them. I can not understand the implementation of even the simplest, for example, entering a value into the Label by clicking a button using Python:</p>
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height=&quot;9*&quot; /&gt;
          &lt;RowDefinition Height=&quot;2*&quot; /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Button x:Name=&quot;btn1&quot; Grid.Row=&quot;1&quot; Width=&quot;200&quot; Height=&quot;30&quot; Content=&quot;Click&quot; Click=&quot;btn1_Click&quot;/&gt;
      &lt;Label x:Name=&quot;lbl1&quot; Grid.Row=&quot;1&quot; Width=&quot;200&quot; Height=&quot;30&quot; Margin=&quot;79,23,513,23&quot; Content=&quot;Nothing...&quot; /&gt;  
  &lt;/Grid&gt;
  </code></pre>
  <p>Button's code:</p>
  <pre><code>private void btn1_Click(object sender, RoutedEventArgs e)
      {
          
              ScriptEngine engine = Python.CreateEngine();
              var a = engine.Execute(&quot;print('hello world')&quot;);
              lbl1.Content = a;
        
      }
  </code></pre>
  <p>Can you tell me about IronPython or .NET Python and C# WPF + Python?</p>
  <p>Best wishes.</p>