Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
That answers my question. Thanx guys. Regards Caz On Tue, Jan 6, 2009 at 10:59 PM, Tomas Matousek < tomas.matou...@microsoft.com> wrote: > The current scope chaining is rather a remnant of a legacy technique of > using Scopes for local variables in IronPython and JScript. The hosting API > does

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Dino Viehland
Yep, I agree that's the right way to go about the actual Python side of the implementation of custom attributes. Of course there's also: field support w/ custom attributes (which would presumably need a new descriptor) property support w/ CAs (and properties can't have arbitrary

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Michael Foord
Dino Viehland wrote: Strangely I don't see one - this is frequently asked for so I'm a little surprised :) I have a plan on how to enable this (and some other .NET scenarios) in the next major release. My current thinking is to support this via meta-classes and providing a new method on type

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Tomas Matousek
The current scope chaining is rather a remnant of a legacy technique of using Scopes for local variables in IronPython and JScript. The hosting API doesn't support chaining by design (this might change in future). The best option for you for now, I think, is to implement IAttributesCollection. T

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Curt Hagenlocher
Scopes are intended for the language-implementation side of things. Languages like Ruby and Javascript support nested lexical scoping but Python does not. Even if we were to expose a mechanism in the hosting API that let you create ScriptScopes which reference nested Scopes, there's no guarantee t

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
You are right, it is basically a "from pricy_scope import *" for each one of my local scopes. I considered doing that, but decided against it as I'm really loathe to copy the context a whole bunch of times. The number of symbols _should_ not be excessive but the pricy_scope setup script is configu

Re: [IronPython] Weird performance issue

2009-01-06 Thread Dino Viehland
I think we are thrashing the hash code call site in CommonDictionaryStorage.HashSite._HashSite. Alternately it could be the equals call site in PythonContext._equalRetBoolSite.Similar to the property issue you can look at the call site object and see if it's going to the fixed read-only Em

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Kristian
Thanks for the reply. I actually got it to work straight away :-) On Jan 6, 4:07 pm, Michael Foord wrote: > Kristian wrote: > > I have a code editor written in JavaScript on my page and I want to > > send the code that it is typed in as a string to IronPython so that it > > can be executed from I

Re: [IronPython] IRC Channel?

2009-01-06 Thread Sylvain Hellegouarch
Slide a écrit : Is there an IRC channel that people from the IP community hang out in frequently? If not, I believe there is an unofficial channel on freenode that could use some more people ;-) Indeed there is that unofficial one but it appears not so many people go there. Come one folks :)

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Dino Viehland
Strangely I don't see one - this is frequently asked for so I'm a little surprised :) I have a plan on how to enable this (and some other .NET scenarios) in the next major release. My current thinking is to support this via meta-classes and providing a new method on type which lets you specify

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Cenovsky, Lukas
> Unfortunately we can't apply attributes to Python classes. I > get round > this particular problem by creating stub classes in C# and inheriting > from them in Python. See: > > http://www.voidspace.org.uk/ironpython/silverlight/scriptable.shtml Is there a CodePlex issue to resolve this? --

[IronPython] IRC Channel?

2009-01-06 Thread Slide
Is there an IRC channel that people from the IP community hang out in frequently? If not, I believe there is an unofficial channel on freenode that could use some more people ;-) -- slide-o-blog http://slide-o-blog.blogspot.com/ ___ Users mailing list U

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Michael Foord
Kristian wrote: I have a code editor written in JavaScript on my page and I want to send the code that it is typed in as a string to IronPython so that it can be executed from IronPython. I got this to work in C# but not in IronPython. Below is the JavaScript I use: var t

Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Curt Hagenlocher
How many symbols are there in this shared global context? Can't you just initialize them in one ScriptScope and then copy the symbols into the other ScriptScopes where you want to use them? This would be analogous to saying "from pricy_scope import *" at the beginning of each module. On Tue, Jan

[IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Kristian
I have a code editor written in JavaScript on my page and I want to send the code that it is typed in as a string to IronPython so that it can be executed from IronPython. I got this to work in C# but not in IronPython. Below is the JavaScript I use: var textarea = document

[IronPython] Weird performance issue

2009-01-06 Thread Glenn Jones
Hi all, More from the Resolver One upgrade: We are seeing several performance failures in our tests, which we expect because the performance profile of IPy2 is different to IPy1. There is one that is perplexing and we hope that someone can give us some insight into possible causes for us to invest

[IronPython] Global and Local ScriptScope

2009-01-06 Thread Caspar Lessing
Hello People I use an embedded instance of IronPython. My program spends effort to create a global context. It then continues to to execute statements inside a local context which need resolve the items in the global context as well. Think of python functions' local context and its interaction wit