Is it possible to use the LINQ types and extension methods in IronPython?
If so how? And also is there often more pythonic to do the same thing?
In IronPython 2.7.1 you have clr.ImportExtensions for this use case.
import clr
clr.AddReference("System.Core")
import System
clr.ImportExtensions(System.Linq)
# will print 3 and 4 :)
[2, 3, 4].Where(lambda x: x != 2).ToList().ForEach(System.Console.WriteLine)
A little background: IronPython 2.7 initially introduced this feature, but there was an issue which stopped it from being really usable.