Referencing Python “import” assemblies when calling from IronPython in C#

前端 未结 1 454
予麋鹿
予麋鹿 2021-02-18 19:02

I\'m a complete noob when it comes to IronPython. I need to call a py script from an ASP.NET website, and have the following code:

var ipy = IronPython.Hosting.P         


        
相关标签:
1条回答
  • 2021-02-18 19:35

    An alternate way of doing this:

    dynamic sys = scriptEngine.ImportModule("sys");            
    sys.path.append(somePath);
    
    0 讨论(0)
提交回复
热议问题