The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run ironpython code, no output
#1
hello everyone,
Executing Python code in qm3 will be very simple. I tried the following code, but no output, why? Thanks in advance

Download and unzip Libraries.zip , and put it in the folder C:\program files\qm3\libraries

C# code:
// script "ironpython.cs" /*/ r Libraries\IronPython.dll; r Libraries\Microsoft.Scripting.dll; r Libraries\Microsoft.Dynamic.dll; /*/ //.
using Au; using System; using Microsoft.Scripting.Hosting;
partial class Script : AScript { [STAThread] static void Main(string[] a) => new Script(a); Script(string[] args) { //;;;

ScriptEngine pythonEngine = IronPython.Hosting.Python.CreateEngine();
ScriptSource pythonScript = pythonEngine.CreateScriptSourceFromString("print 'Hello World!'");
pythonScript.Execute();

}
}


Attached Files
.zip   Libraries.zip (Size: 1.52 MB / Downloads: 243)


Messages In This Thread
Run ironpython code, no output - by macman - 01-07-2021, 11:27 AM
RE: Run ironpython code, no output - by Gintaras - 01-07-2021, 12:10 PM
RE: Run ironpython code, no output - by macman - 01-08-2021, 12:45 AM
RE: Run ironpython code, no output - by macman - 01-08-2021, 05:51 AM
RE: Run ironpython code, no output - by Gintaras - 01-08-2021, 06:12 AM
RE: Run ironpython code, no output - by Gintaras - 01-08-2021, 06:59 AM
RE: Run ironpython code, no output - by Gintaras - 01-08-2021, 07:29 AM
RE: Run ironpython code, no output - by macman - 01-08-2021, 08:42 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)