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

A way to run an infinite loop without the stackoverflowexception on ironpython?

I'm having a little problem when trying to run an infinite loop in ironpython 2.7 Here is my script: import urllib import urllib2 import json a=0 info = '' def getInfo(): url = 'https://api.bitfinex.com/v1/pubticker/btcusd' values = {} …
1
vote
1 answer

import wpf to IronPython app

I'd like making IronPython WPF app' but VS says: ImportError: No module named 'wpf' I tried this link but it doesn't work. I am not sure about where doing this: import clr clr.AddReference('IronPython.Wpf') import wpf When I write this it says…
Newokmyne
  • 65
  • 2
  • 10
1
vote
2 answers

How to create a new MSMQ message in IronPython with label, reply queue and other properties

I'm following this example here to use MS Message Queues with IronPython. The example works to create a message text string without any properties. import clr clr.AddReference('System.Messaging') from System.Messaging import MessageQueue ourQueue =…
576i
  • 7,579
  • 12
  • 55
  • 92
1
vote
1 answer

Ironpython code taking too long to execute?

I have a piece of code written in Iron Python that reads data from table present in SpotFire and serialize in JSON object. It is taking too long to get executed. Please provide alternates to it. import clr import…
user948401
  • 31
  • 6
1
vote
1 answer

access host class from IronPython script (lightswitch)

I'm new at this, so I hope the question is well formed enough for someone to understand what i'm asking, if not I'm happy to add more detail. I am trying to reference a variable defined on the server side of a lightswitch application from a python…
1
vote
1 answer

How do I programmatically change the column referenced by Column Values Line in Spotfire?

I'm trying to create a button in Spotfire that will change the Y-Axis in my chart to and from log- to linear-scale. I also have a line in the chart that is plotted from column values in a data table, and hence when the Y-Axis scale changes, I also…
Jeff Stewart
  • 97
  • 10
1
vote
0 answers

IronPython: instancemethod objects inherit operator overloads of the owning class

I ran across a strange phenonemon with IronPython (2.7.5). Please take a look at the following example code: class X(object): def __eq__(self, other): print "__eq__" return False def foo(self): return 1 a =…
Krid
  • 95
  • 1
  • 11
1
vote
2 answers

Spotfire: changing formula in calc column using IronPython

Long time user very first question: I am trying to update the formula in a calculated column in Spotfire using ironpython. I have a table called tbl_test with calculated column 'Biz_rule'. I create a string called str_statement and try to use it to…
1
vote
1 answer

How can try python working in WPF?

Try Python is An interactive Python tutorial running in the browser. http://www.trypython.org/ But, I want to run it in my Winform or WPF application. How can I do that? I konw WPF support WebBrowser, could I use try python by it? I want to add a…
Begtostudy
  • 1,374
  • 4
  • 13
  • 28
1
vote
1 answer

Spotfire SaveAs using ironPython

I am trying to SaveAs a document as a library item on 'onPropertyChange' event using ironpython script. the script`s code attached to the property : # Import namespaces from Spotfire.Dxp.Application import DocumentSaveSettings from…
user1573640
  • 293
  • 1
  • 2
  • 10
1
vote
1 answer

How to create python Ply lex passing a module

I'm trying to use a Logo Language Compiler that uses Ply into the Unity3D environment for an Open Source project https://github.com/ssouzawallace/blocks-programming. To do so I am using IronPython that is a Python interpreter running in .NET (I need…
Wallace
  • 504
  • 4
  • 19
1
vote
1 answer

Delete the large object in ironpython, and instantly release the memory?

I am a creating a huge mesh object (some 900 megabytes in size). Once I am done with analysing it, I would like to somehow delete it from the memory. I did a bit of search on stackoverflow.com, and I found out that del will only delete the reference…
marco
  • 899
  • 5
  • 13
  • 21
1
vote
1 answer

Comfortable use of PTVS Debugger

I have a C# environment in which I use IronPython scripts. I want to debug these using Visual Studio i.e. PTVS. I set everything up and it does work, but it works only once. After I stop the debugger or the scripts ends, I cannot attach to the…
Marcel Bonzelet
  • 238
  • 2
  • 13
1
vote
1 answer

How to export a Tibco Spotfire report in PPT file on the Action Button Click

I want to export a Tibco Spotfire report in PPT format as user clicks on the Button. Is there any IronPython script which can do this as action fires?
Rax
  • 406
  • 5
  • 18
1
vote
1 answer

IronPython - WPF application - Gather User input from GUI (after I close th GUI) and use it in main Python code

I developed an IronPython-wpf application with GUI using XAML. The user enter all the inputs in the GUI and I can save them. My problem is how I could pass those variables to my main python code after USER closes the GUI? To close the GUI, I have…
Hamid K
  • 983
  • 1
  • 18
  • 40