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
1 answer

Toggling Rules in a Spotfire visualization

I am looking for a way to toggle rules on a visualization so that I can see either the top or bottom values of the Gross Margin % variable(but not both at the same time). Currently, the visualization is a cross table. The problem is that in the…
Jamey Copeland
  • 135
  • 1
  • 12
1
vote
0 answers

Tibco Spotfire - Add Column Based on Whether a File is Present in a Location (IronPython?)

I have a column that is essentially a list of directory paths in Spotfire. What I would like to do, is add (or realistically, replace) a calculated column that uses that column as the file path and return whether or not a file is present in the…
jm743577
  • 11
  • 1
1
vote
2 answers

"No module named fcntl" when py script run from c# but works from windows command line

I am calling a python script that uses imaplib.py and get the "no module named fcntl" error. From searching I found that this module is only available in unix and so I wonder if the py script is confused about what os it is running under. Again,…
Vince Bray
  • 53
  • 2
  • 8
1
vote
1 answer

How to pass Expression to a C# function from IronPython

Given a C# function as below, what is the valid syntax in IronPython to call it? public void MyFunction( Expression foo) { }
Joe
  • 631
  • 2
  • 7
  • 18
1
vote
1 answer

IronPython - Exposing methods using reflection

I'm using IronPython and I know how to expose methods from my class to the script's scope: m_scope.SetVariable("log", new Action(Log)); public void Log(string a) { Console.WriteLine(a); } However, instead of calling SetVariable…
Gilbert Williams
  • 175
  • 1
  • 10
1
vote
1 answer

Spotfire 7 -> How to apply custom sort order on a list object using Iron Python

Spotfire 7 -> How to apply a custom sort order on a list object using Iron Python in Spotfire 7? I am using document.properties["Columns"] list to populate the columns of the cross table at the run time. I would like to apply the custom sort order…
Swapnil
  • 129
  • 1
  • 5
1
vote
1 answer

Python Scripting in TIBCO Spotfire to show custom Messages

I am loading a data table on demand and have linked it to markings in a previous tab. The Data table look like: ID Values 1 365 2 65 3 32 3 125 4 74 5 98 6 107 I want to…
1
vote
0 answers

How to access multi visual replacement control in Spotfire 7 using Iron Python script?

I am using a multi visual replacement control in Spotfire 7.0.I would like to toggle the visualization (such as a cross table) which is part of this multi visual replacement control using iron Python script on a click of a button.Does anyone know…
Swapnil
  • 129
  • 1
  • 5
1
vote
0 answers

Using python files with libraries in Visual Studio

I want to use some python files in a Visual Studio WPF application, using this code. var ipy = Python.CreateRuntime(); dynamic test = ipy.UseFile("Test.py"); string whatever = test.pythonString() MessageBox.Show(whatever); where Test.py looks like…
Oscar Johansson
  • 135
  • 1
  • 2
  • 11
1
vote
0 answers

Using Gstreamer Python module with IronPython

I want to use GStreamer Python Binding in my ASP.NET application as a plugin of Gstreamer I need is available in GStreamer's Python binding rather than its C# binding. To achieve the goal I have done the following steps: Install PTVS 2.2 from…
IT_Layman
  • 337
  • 4
  • 17
1
vote
2 answers

Unable to run python scripts with libraries using IronPython in Visual Studio

I have tried running python scripts in Visual studio with IronPython and it goes well until I try to use any library in the python script, using this code. var ipy = Python.CreateRuntime(); dynamic test = ipy.UseFile("C:/Python/Test.py"); var…
Oscar Johansson
  • 135
  • 1
  • 2
  • 11
1
vote
1 answer

How to resize spotfire text area dynamically

Filters in text area is consuming space even if I hide filters. I want to hide entire text area so that I have more space for my visualisations. Text area should be dynamic that if user wants any filters there should be toggle button which helps to…
dharma
  • 51
  • 1
  • 5
1
vote
0 answers

Dynamic proxy combined with IronPython

I'm looking for a tool that would allow me to log method parameters ( basically something like PostSharp ) and return values at runtime. The tricky part is that I would like to do this for a Ironpython exposed C# class. I tried using KingAOP and…
Christo S. Christov
  • 2,268
  • 3
  • 32
  • 57
1
vote
0 answers

Looking to Disable Empty values in Color by legend for spotfire

I am using specific column Test with values like Apple Banana Orange Watermelon and some null values for coloring in visualization .The problem here is when i am trying to shown this color by as legends then null values are showing up in the list…
sofuser9
  • 219
  • 3
  • 14
1
vote
1 answer

Change IronPython version in Edge.js?

I am testing Edge.JS since I need to run Python functions from Node.js. The problem is that Edge seems to want another version of IronPython: Could not load file or assembly 'IronPython, Version=2.7.0.40, Culture=neutral,…
DrakaSAN
  • 7,673
  • 7
  • 52
  • 94