How do I create a C# event handler that can be handled in IronPython?
Note that I am using IronPython 2.0.1. I am able to handle events from system classes with no problems (eg Window.KeyDown) but when I try to define my own C# event an exception is raised when I attempt to hook it from IronPython.
The exception thrown is ArgumentType...
Does the DLR or even better Iron Python run in Silverlight?
...
For example in Lua you can place the following line at the end of a script:
return <some-value/object>
The value/object that is returned can then be retrieved by the hosting application.
I use this pattern so that scripts can represent factories for event handlers. The script-based event handlers are then used to extend the applicat...
I have a list comprehension operating on elements of an .NET array like
obj.arr = [f(x) for x in obj.arr]
However the assignment back to obj.arr fails.
Is it possible to convert a list to a .NET array in IronPython?
...
What would you use for a brand new cross platform GUI app, CPython or IronPython ?
What about
- license / freedom
- development
- - doc
- - editors
- - tools
- libraries
- performances
- portability
What can you do best with one or the other ?
- networking
- database
- GUI
- system
- multi threading / processing...
Howdy,
I'm trying to extend one of my WebApps using IronPython, unfortunately the code below runs pretty slowly:
var engine = Python.CreateEngine();
SourceCodeKind st = SourceCodeKind.Statements;
string source = "print 'Hello World'";
var script = engine.CreateScriptSourceFromString(source, st);
...
Hello. I am new to IronPython. I've read the MSDN article http://msdn.microsoft.com/en-us/magazine/cc300810.aspx and for what I've understood I can set code with IronPython on the run. I created a simple Windows Forms project in IronPython studio and ran it, but I can't find on the IDE anywhere to type code into. Isn't it possible, am I ...
I'd love to use IronPython to explore the .net runtime and libraries, but coming from CPython I miss IPython's completion and shortcuts.
Last time I checked IPython couldn't be used due to a lack of sys.getframe, but the latest beta versions included support for it.
Is there anything lacking?
Can one start to use IPython with IronPyt...
How close can I get to defining a model in SQLAlchemy like:
class Person(Base):
pass
And just have it dynamically pick up the field names? anyway to get naming conventions to control the relationships between tables? I guess I'm looking for something similar to RoR's ActiveRecord but in Python.
Not sure if this matters but I'll...
I want to access some .NET assemblies written in C# from Python code.
A little research showed I have two choices:
IronPython with .NET interface capability/support built-in
Python with the Python .NET package
What are the trade-offs between both solutions?
...
I have to get the data from a User site. If I would work on their site, I would VPN and then remote into their server using username and password.
I thought getting data into my local machine than getting into their server where my work is not secured.
So, I thought of using Ironpython to get data from the remote server.
So, I still V...
Hi,
I'm trying to extend my webapp with IronPython, which is working wonderfully so far, but I can't seem to get it to play nicely with my NHibernateLinq setup.
I'm making an IQueryable<Case> available to the IronPython code, and then I'm using the Linq methods to filter it down, such as:
Enumerable.Where[object](data, Func[object, bo...
I have been doing Michael Foord's IronPython&Winforms tutorials in the interactive console.
Is it possible to remain in the console after the issueing
Application.Run(form)
so, I can put controls on the form while it is running?
The goal is to dynamically modify the WinForms controls at runtime, adding event handlers, changing prop...
Maybe, it is a stupid question but I can't use python eggs with IronPython.
I would like to test with IronPython 2.0.2 one module that I've developped. This modules is pure python. It works ok with python 2.6 and is installed as a python egg thanks to setuptools.
I thought that the process for installing my module under IronPython was ...
I am running IronPython 2.0.2 interactive console with Mono 2.4 on OSX Terminal.app . How do I insert indent/tab in the Terminal.app ? I want to do this so I can indent my code.
For example I want to input print "hello tab" what I see is print "hellotab" despite pressing the tab key many times. When the command gets executed it p...
Hi,
I have created a dll using C#. How do use the dll in IronPython. I have tried to add the dll using clr.AddReference("yxz.dll"). But it fails. I have tried placing the dll in the execution directory of the IronPython script. Still it fails stating that "Name xyz cannot be found" while trying to refer the dll.
...
I need to port some code that relies heavily on lxml from a CPython application to IronPython.
lxml is very Pythonic and I would like to keep using it under IronPython, but it depends on libxslt and libxml2, which are C extensions.
Does anyone know of a workaround to allow lxml under IronPython or a version of lxml that doesn't have th...
I've got a WPF application that embeds IronPython to use as a scripting language. I've got an object model that IronPython scripts can use to do 'stuff'.
However I've come across a strange problem that I've solved in a way that I don't believe is correct.
In my script I want to type the following to set the location of an object in WPF...
I'd like to create new command line to attach Visual Studio to an application with IronPython:
My Script:
import clr
import System
from System.Runtime.InteropServices import Marshal
DTE = Marshal.GetActiveObject('VisualStudio.DTE')
curLocalProcess = DTE.Debugger.LocalProcesses
print curLocalProcess.Count
currentProc = curLocalProcess...
I'm trying to use a python package from IronPython.
Everything works fine if I import regular python modules.
But when I try to do the following:
import win32ui
I get:
No module named win32ui
I've hunted through the code in IronPython.Runtime.Importer and there's no mention of .pyd
Anyone know a way around this?
...