Questions tagged [ironpython]

IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily. Use this tag for implementation-specific questions, general Python questions should just be tagged with "python".

IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily.

IronPython can be obtained at http://ironpython.net/.

Comparison of IronPython vs. C# for 'Hello World'

c#:

using System;
class Hello
{
    static void Main() 
    {
        Console.WriteLine("Hello, World");
    }
}

IronPython:

print "Hello, World"

IronPython is a Dynamic Language that runs on the .NET DLR (Dynamic Language Runtime) in contrast with VB.NET and C# which are static languages.

Iron Python can also import DLL files compiled in other languages and use functions defined therein. For example:

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import *

Chat/Communication

Join our Gitter-Chat under: https://gitter.im/IronLanguages/main

2618 questions
1
vote
0 answers

Python for .net 64 bit installation

I recently installed python for .net on my 64 bit machine. I followed the instructions from https://github.com/geographika/PythonDotNet. I copied the files from /PythonDotNet202_py27_net4_x64 to C:\Python27\DLLs. However, when I do import clr, I got…
BooYaah
  • 51
  • 1
  • 8
1
vote
2 answers

How am I able to get values from a column in spotfire tables using Iron Python scripting?

I have few data tables in spotfire. But i need to refer column in specific table (which is not current Active reference table) using iron python scripting. And also I would like to print unique values in a column. EX : I have a property control with…
sofuser9
  • 219
  • 3
  • 14
1
vote
2 answers

Creating thumbnail images in IronPython using CLR. Passing delegate troubles

I am trying to create a thumbnail image using IronPython utilising the Common Language Runtime. Coming from a Visual Basic background I am struggling with the concept of passing a delegated function to the CLR from within IronPython. Below is my…
1
vote
1 answer

Running IronPython object from C# with dynamic keyword

I have the following IronPython code. class Hello: def __init__(self): pass def add(self, x, y): return (x+y) I could make the following C# code to use the IronPython code. static void Main() { string source =…
prosseek
  • 182,215
  • 215
  • 566
  • 871
1
vote
1 answer

Getting the string from IronPython source code with C#

The book of IronPython In Action has the following code to read python script into a string. (Chapter 15.2) static string GetSourceCode(string pythonFileName) { Assembly assembly = Assembly.GetExecutingAssembly(); Stream stream =…
prosseek
  • 182,215
  • 215
  • 566
  • 871
1
vote
0 answers

Spotfire how to control one document property with another one with ironpython script

I have two document properties in form of a list boxes. The challenage is that when i select value 'last month' on the 1st document proeprty (named L8WLM), i want 2nd document property (named EmTime) to automatically change to 'Year&month'…
Karolina
  • 11
  • 6
1
vote
1 answer

How do I access fields in an active Revit schedule via RevitPythonShell/IronPython?

I'm working on an IronPython script for Revit 2016. For starters, I'm trying to access values (as text) in an active Revit schedule, and load them into a variable. This works well enough for non-calculated values. However, some of my schedule…
Johnny B
  • 31
  • 5
1
vote
1 answer

GAC (gacutil) not working with IronPython.dll on Mono

I tried to use gacutil (mono) for IronPython, but I got the following error. sudo gacutil -i IronPython.dll Password: Failure adding assembly IronPython.dll to the cache: Strong name cannot be verified for delay-signed assembly What does this…
prosseek
  • 182,215
  • 215
  • 566
  • 871
1
vote
0 answers

RAGE Plugin Hook: Mod Causes CTD using mutliple languages

I am, or rather attempting to, create a mod for GTA V using RAGE Plugin Hook, IronPython, and C#. Unfortunately, I am running into issues. I received an exception, in either C# or Assembly, and python being my native language, I took; [8/10/2016…
x otikoruk x
  • 422
  • 1
  • 6
  • 16
1
vote
1 answer

Export Datatables from Spotfire to CSV using IronPython Script

I have a IronPython script I use to export all my data tables from a Spotfire project. Currently it works perfectly. It loops through all datatables and exports them as ".xlsx". Now I need to export the files as ".csv" which I thought would be as…
brandog
  • 1,497
  • 5
  • 20
  • 28
1
vote
0 answers

Overloading magic methods with IronPython

I'm attempting to define the power operator ** in a C# class (we'll call it class Foo). I've overridden __pow__(), which gets me the desired behavior for operations of type Foo ** int. Unfortunately, I need to also define int ** Foo, and neither…
JustOnePixel
  • 689
  • 1
  • 7
  • 16
1
vote
1 answer

Without a roadmap, can DLR be used with IronPython, assuming it will continue to be packaged in future .NET Versions

DLR or Dynamic Language Runtime hasn't seen any activity after mid 2010, still around its v1.0 release since then. I need DLR and IronPython to run my Python code using Numpy and at the same time provide a sleek WPF User Interface.
vijiboy
  • 584
  • 11
  • 25
1
vote
2 answers

Importing assemblies into IronPython from another assembly

I have an IronPython 2.6/2.7 script I am writing which imports a lot of assemblies. In other words, at the top of the script it does this... clr.AddReference( "System.Xml" ) import System.Xml Except it doesn't do this for 1 assembly, but for 10…
namenlos
  • 5,111
  • 10
  • 38
  • 38
1
vote
1 answer

Nested list comprehension against .NET Arrays within Arrays

I have a .NET structure that has arrays with arrays in it. I want to crete a list of members of items from a specific array in a specific array using list comprehension in IronPython, if possible. Here is what I am doing now: tag_results =…
noelhx
  • 111
  • 10
1
vote
1 answer

Using wpf datagrid with ironpython and sqlite3

I am trying to figure out how to make use IronPython (2.6) wpf and sqlite3 (i use the Ironpython.SQLite.dll) I get somewhat stuck in how to use the wpf datagrid. Can anyone help me further in how to code in order to fill the datagrid with the data…
Hennie
  • 19
  • 5