Looks like it's using the .NET RegEx library. Here's the reference, in
case there are syntax differences in the RegEx language used:
http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconRegularExpres
sionsLanguageElements.asp
Grouping Constructs:
http://msdn.microsoft.com/library/en-us/cpge
When trying to local a "simple" regular expression, I get the following:
$ IronPython-0.7.6/bin/IronPythonConsole.exe
IronPython 0.7.6 on .NET 2.0.50215.44
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import re
>>> sect = re.compile('\[(?P[^]]+)\]')
System.ArgumentException: parsi
>Interesting, but this seems to be purely for decorating method definitions,
>not method calls, and I'm not sure how any similar syntax would help.
This is not completely true. The way decorators work is that they wrap the
decorated object (either the function or another decorator if you cascade
th
This is a good example, but I think that using Execute to load the
assembly by name is a dangerous approach. I'd strongly suggest loading
your assemblies using the following API - this is likely to be a
standard idiom for making the program's classes available to a script:
engine.LoadAssembly(typ
Interesting, but this seems to be purely for decorating method definitions, not
method calls, and I'm not sure how any similar syntax would help.
The only thing I could think of would be to hint the parser, which may be what
you had in mind.
def foo(int)
def foo(string)
def bar[T](T, int)
def
Wow! Thanks, Martin. That actually helps me out quite a bit, as well.
I took a look at the console code to see how it does it, but this puts
it into a much more concise form.
I'd like to use ironpython as the scripting language for my system,
and this will make it much easier.
-Corey
On 7/21/05,
Hi Morgan,
> Morgan Martinet Wrote:
>
> Why don't you use the C# string notation that allows you to
> have multiple lines of text (as in Python with the triple
> quote notation)?
The perfectionist side of me doesn't like what it does to the
code formatting :( (for the record, I like the C wa
Hi,
Did you guys have a look at the new Python decorators that are a little like
.Net meta attributes?
You can also see how it can be applied to function overloading, in a Guido's
short article:
http://www.artima.com/weblogs/viewpost.jsp?thread=101605
I know this is purely Python stuff, but maybe
Hi Martin,
Thanks for the examples!
> using System;
> using IronPython.Hosting;
>
> namespace Embed {
> public class Program {
> public static int Value = 0;
>
> static void Main(string[] args) {
> PythonEngine engine = new PythonEngine();
>
> engine
You can call IronPython through the IronPython.Hosting.PythonEngine
object.
Here's a trivial example:
using IronPython.Hosting;
class Program {
static void Main(string[] args) {
PythonEngine engine = new PythonEngine();
Console.WriteLine( engine.Evaluate("2
10 matches
Mail list logo