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
2 answers

How do I set the x-axis (xaxis) on a Bar Graph in Spotfire with IronPython?

I need to change the column used on the x-Axis on a bar chart. how can I do this in IronPython?
Keng
  • 52,011
  • 32
  • 81
  • 111
1
vote
0 answers

How do you add an OnLoad event to an IronPython WinForm?

I'm having a problem getting the OnLoad event called from an IronPython script that uses WinForms, I've reduced the problem to the smallest possible reproduction case: from clr import AddReference, accepts, returns,…
Doug-W
  • 1,318
  • 12
  • 14
1
vote
1 answer

WPF - Ironpython - How to destroy a frame

I am wondering how you can define a click event handler to destroy a window in Ironpython using xaml. The Tkinter command is: self.Parent.destroy()
Hamid K
  • 983
  • 1
  • 18
  • 40
1
vote
1 answer

HTML Page from selected row in Spotfire

I have come across a requirement that is already available in the current tool and they expect it to be implemented in Spotfire as well. Requirement: Once data is loaded in Spotfire and they click on a row, there is a button "View in Web" that will…
Ezio
  • 376
  • 5
  • 21
1
vote
2 answers

Proxy objects in IronPython

I'm trying to make a proxy object in IronPython, which should dynamically present underlying structure. The proxy itself shouldn't have any functions and properties, I'm trying to catch all the calls in the runtime. Catching the function calls is…
apetrovic
  • 51
  • 3
1
vote
0 answers

IronPython with DynamicObject subclass

I have a class inheriting from DynamicObject which I need to expose through IronPython. I can access dynamic properties with no problems, but plain old properties don't work. This is a slightly simplified implementation of my object: class Foo :…
s.m.
  • 7,895
  • 2
  • 38
  • 46
1
vote
2 answers

Need Object or Property in Spotfire.DXP that controls "Lines & Curves"

I am controlling a ScatterPlot from an IronPython script in Spotfire. I can not find the necessary property or object to create or control "Line from Column" created using the "Lines & Curves" option in a scatter plot. (see attached image): My…
mike
  • 2,149
  • 20
  • 29
1
vote
0 answers

Is there a way to add "manually" assemblies to .NET the way clr.addReference does?

It has been some time now that I have been stuck in my program because it crashes at import clr when I launch the .exe of it. Is there another way to do what clr.addReference('myDll') does but manually and make .NET know of my dll?
MaTh
  • 217
  • 1
  • 12
1
vote
2 answers

How can I automatically update a filter when my analysis is opened?

I have a list of dates in a column: 2015-01-01 2015-02-01 2015-03-01 2015-04-01 2015-05-01 We now have 1st February, so I save the dashboard with filtering set to keep only rows where date is between 1st February and 1st April. Next month, I will…
Jacek Sierajewski
  • 613
  • 1
  • 11
  • 33
1
vote
0 answers

DLR: Do i really need code generation here?

spent some time again with the scripting interface of my app. i guess i now have an advanced dlr problem here. I have a python script I have an .NET object [o1] I call a method on the python script from .NET via Iron Python. The python code creates…
charly_b
  • 69
  • 10
1
vote
2 answers

How can checkbox filter be set with IronPython in Spotfire?

I have a column that is set as a checkbox filter which has two values ("Refund" and "EMPTY"). I'd like to set that filter to have only the "Refund" box checked, but I can't find out how to set it. How is this done easily in IronPython?
Keng
  • 52,011
  • 32
  • 81
  • 111
1
vote
1 answer

How can I create a Calculated Column in Spotfire with IronPython script (preferably using External Name)?

I have a data table where I can not count on the column names being the same from moment to moment so I cannot build Calculated Columns the standard way because it uses the "Column Name" property (and that can change). So, I'd like to build them via…
Keng
  • 52,011
  • 32
  • 81
  • 111
1
vote
0 answers

ironpython compilation for external module

I am compiling IronPython scripts into EXE file by referring to: IronPython - how to compile exe It is working fine if all the IronPython scripts are located in the same folder. However, if I have IronPython script in different folder, I will…
1
vote
1 answer

Settings Background image with python

import wpf from System.Windows import Application, Window,MessageBox from Main import * from Sign_Up import * import System from System.Windows.Controls import * from System.Windows.Input import * from System import Uri from…
t chen
  • 11
  • 2
1
vote
2 answers

how to use classes written in IronPython in VB.NET

I have a class (e.g. MksMath) written in IronPython using SharpDevelop 3.2. After compiling it for class library, it produced the following…
M K Saravanan
  • 359
  • 1
  • 4
  • 12