ironpython

How do I use dynamic objects with asp.net?

I have a dynamic object built inside IronPython and I would like to build controls on my asp.net page dynamically based on what types of objects are nested inside my dynamic object: dynamic variousComplexObjects = IronPythonApp.GetControls(); repeater.DataSource = variousComplexObjects; repeater.DataBind(); Can someone write me a quic...

How can I download files form web pages?

Some web pages, having their urls, have "Download" Text, which are hyperlinks. How can I get the hyperlinks form the urls/pages by python or ironpython. And can I download the files with these hyperlinks by python or ironpython? How can I do that? Are there any C# tools? I am not native english speaker, so sorry for my english. ...

How can I set up dynamic imports when hosting IronPython?

I'm writing a C# client application which is intended to have strong support for customisation via scripting, and I have chosen IronPython as my target scripting language. I would like to keep the user's code in the application's database with the rest of its state, but I need the user to be able to split their scripts into files and mod...

Is it possible to host the .Net DLR in an "idiot-proof" sandbox?

I would like to host the Dynamic Language Runtime (DLR) in such a way that users who run arbitrary scripts in it cannot bring the process down? The DLR hosting spec describes how to host the DLR in a separate ApplicationDomain. This allows to tear down and unload a script runtime and to restrict certain operations through CAS (e.g. I ca...

Is there any Iron Python plug-in for Monodevelop?

I have installed Iron Python on my Ubuntu 10.4 and Mono Develop, but there is no interaction between them. Is there any Iron Python plug-in for Monodevelop as in VS? If not, wich is the best Iron-Python IDE for Ubuntu or Debian? ...

IronPython returns wrong type when using class in classy library

Can someone recommend a workaround for this ironpython bug? I have a class contained within an external class library. I consume this class inside an embedded ironpython instance. When the class is retrieved from the scope by my c# app, the classes don't seem to match up! My python script: import sys import clr from ExternalAssembly i...

Is Ironpython suitable for value calculation?

I want to allow the users to define a formula based on two variables. Say I have a Quantity and Value and I want to allow the users of my app to write something like Quantity*20+Value*0,005 in a textbox and pass the result back to the C# app. I thought of embedding the IronPython interpreter in my app, but I'm not sure it's worth the ...

Creating an IronPython (dynamic) object from a string

Say I have a python script 'calculator.py': def Add(x,y) : return x + y; I can instantiate a dynamic object from this like so: var runtime = Python.CreateRuntime(); dynamic calculator = runtime.UseFile("calculator.py"); int result = calculatore.Add(1, 2); Is there a similarly easy way to instantiate the calculator from an in-me...

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 output: IronPython.dll IronPython.Modules.dll Microsoft.Dynamic.dll Microsoft.Scripting.Core.dll Microsoft.Scripting.Debugging.dll Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll ...

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

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 better library from Python. I am happy to be corrected. There is a so...

IronPython: Is there an alternative to significant whitespace?

For rapidly changing business rules, I'm storing IronPython fragments in XML files. So far this has been working out well, but I'm starting to get to the point where I need more that just one-line expressions. The problem is that XML and significant whilespace don't play well together. Before I abandon it for another language, I would l...

IronPython unable to see certain classes in my Assembly

Im having trouble using some of the classes in my Assembly from IronPython. This is the line I am using in my script: from Comet.Pricing.Parsing import RegexLookupMapper The class is defined as: public class RegexLookupMapper<T> : SingleValueMapper<string, T> I have no problem importing another class in that Assembly: from Comet.P...

CPython vs. Jython vs. IronPython for cross-platform GUI development.

I'm thinking of making some kind of experimental IDE for digital hardware design. So I can't decide witch platform to choose. I'm going to have text-editor with syntax highlighting, some vector graphics and lots of tabbed windows. My goals: 1. to make GUI using as less custom components as possible. 2. to make it as cross-platform as p...

BeautifulSoup and ASP.NET/C#

Has anyone integrated BeautifulSoup with ASP.NET/C# (possibly using IronPython or otherwise)? Is there a BeautifulSoup alternative or a port that works nicely with ASP.NET/C# The intent of planning to use the library is to extract readable text from any random URL. Thanks ...

IronPython - how to rename a folder name

for example: how to rename C:\Program Files\Music_Files to C:\Program Files\MusicFiles ...

Writing binary data to stdout with IronPython

I have two Python scripts which I am running on Windows with IronPython 2.6 on .NET 2.0. One outputs binary data and the other processes the data. I was hoping to be able to stream data from the first to the second using pipes. The problem I encountered here is that, when run from the Windows command-line, sys.stdout uses CP437 character...

Can I use Named and Optional Arguments in ironpython

I hope to load .net dll in ironpython. But one of static functions in .net dll, has some Named and Optional Arguments. like, Draw(weight:w,height:h, Area=1) Only can I use full arguments? ...

Controlling a C# Winforms GUI with IronPython

So I made a Winforms GUI in Visual Studio using C#, but for the project I am working on I want the majority of the code to be written in Python. I am hoping to have the "engine" written in python (for portability), and then have the application interface be something I can swap out. I made the C# project compile to a .dll, and was able ...

Creating Instances of IronPython Classes From C#

I want to create an instance of an IronPython class from C#, but my current attempts all seem to have failed. This is my current code: ConstructorInfo[] ci = type.GetConstructors(); foreach (ConstructorInfo t in from t in ci where t.GetParameters().Length == 1 select t) { ...

is it possible to access subversion from ironpython?

Hello. Python has a subversion bindings called 'pysvn' that can be used to manipulate subversion repository. Does something similar exists for IronPython? My test platform in Windows 7 64-bit with Vsual Studio 2010. ...