.net

Problems embedding IronPython in C# (Missing Compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember'

Problems embedding IronPython in C# (Missing Compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember' Question: I’m trying to do a simple hello world to test out embedding IronPython within C# but can’t seem to resolve this problem.. This is my C# file; using System; using IronPython.Hosting; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using System.IO; public class dynamic_demo { static void Main() …

Total answers: 3

How do I run a Python script from C#?

How do I run a Python script from C#? Question: This sort of question has been asked before in varying degrees, but I feel it has not been answered in a concise way and so I ask it again. I want to run a script in Python. Let’s say it’s this: if __name__ == ‘__main__’: …

Total answers: 9

Iron Python : what are good uses for Iron Python

Iron Python : what are good uses for Iron Python Question: I have an affinity for python, but I work in a .NET environment, so I was looking into Iron Python, and wondering what it would be used for. Could you write an app in it? or is it for adding a scripting language to …

Total answers: 12

F# vs IronPython: When is one preferred to the other?

F# vs IronPython: When is one preferred to the other? Question: While the languages F# and IronPython are technically dissimilar, there is large overlap between their potential uses in my opinion. When is one more applicable than the other? So far it look to me like F# is computationally more efficient while IronPython inherits a …

Total answers: 5

How to load a C# dll in python?

How to load a C# dll in python? Question: how can I load a c# dll in python? Do I have to put some extra code in the c# files? (like export in c++ files) I don’t want to use IronPython. I want to import a module to Python! Asked By: aF. || Source Answers: …

Total answers: 4

IronPython vs. Python .NET

IronPython vs. Python .NET Question: I want to access some .NET assemblies written in C# from Python code. A little research showed I have two choices: IronPython with .NET interface capability/support built-in Python with the Python .NET package What are the trade-offs between both solutions? Asked By: cschol || Source Answers: If you want to …

Total answers: 10

Instantiating a python class in C#

Instantiating a python class in C# Question: I’ve written a class in python that I want to wrap into a .net assembly via IronPython and instantiate in a C# application. I’ve migrated the class to IronPython, created a library assembly and referenced it. Now, how do I actually get an instance of that class? The …

Total answers: 4

How to convert my code from C# to Python?

How to convert my code from C# to Python? Question: How can I convert this code from C# to Python to be run on IronPython? I don’t have any experience with Python. using System; using Baz; namespace ConsoleApplication { class Program { static void Main() { Portal foo = new Portal("Foo"); Agent bar = new …

Total answers: 4

Is there a zip-like method in .Net?

Is there a zip-like method in .Net? Question: In Python there is a really neat function called zip which can be used to iterate through two lists at the same time: list1 = [1, 2, 3] list2 = [“a”, “b”, “c”] for v1, v2 in zip(list1, list2): print v1 + ” ” + v2 The …

Total answers: 5