Re: [IronPython] datetime.strptime is missing in IronPython?

2010-06-07 Thread Tony Meyer
On Tue, Jun 8, 2010 at 4:46 PM, Vernon Cole wrote: > The issue tracker for CPython  [if I read it correctly] lists > datetime.strptime as a new feature to be supported in python 2.7 and > 3.2. It is not documented in the Python 2.6 manual. datetime.datetime.strptime is definitely in CPython 2.5 a

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Christos Pavlides
Thanks Dino and Jeff, You guys are great, I was not expecting these fast responses. Thanks again, I will do a number of changes based on your comments and see if I have any issues. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On B

Re: [IronPython] datetime.strptime is missing in IronPython?

2010-06-07 Thread Vernon Cole
The issue tracker for CPython [if I read it correctly] lists datetime.strptime as a new feature to be supported in python 2.7 and 3.2. It is not documented in the Python 2.6 manual. The current way of doing it seems to be: >>> import datetime >>> import time >>> d = datetime(*(time.strptime(date

Re: [IronPython] Where can I download the IronPython Tools for Visual Studio 2010

2010-06-07 Thread Zhi-Yue Sun
Hi Brian, I am sorry to tell you that I can't visit http://ironpython.net . There is any other address to download it? Or may you download it then send to me? Thanks, -ZhiYue Sun On Tue, Jun 8, 2010 at 9:23 AM, Brian Curtin wrote: > On Mon, Jun 7, 2010 at 20:21, Zhi-Yue Sun wrote: > >> Hi al

Re: [IronPython] Where can I download the IronPython Tools for Visual Studio 2010

2010-06-07 Thread Brian Curtin
On Mon, Jun 7, 2010 at 20:21, Zhi-Yue Sun wrote: > Hi all, > > I'm a new to IronPython Tools. I heard that IronPython Toos is cool. Can > anyone tell me Where can I download the IronPython Tools for Visaul Studio > 2010. > > Thanks, > -ZhiYue Sun > ZhiYue, Check out http://ironpython.net/ironpy

[IronPython] Where can I download the IronPython Tools for Visual Studio 2010

2010-06-07 Thread Zhi-Yue Sun
Hi all, I'm a new to IronPython Tools. I heard that IronPython Toos is cool. Can anyone tell me Where can I download the IronPython Tools for Visaul Studio 2010. Thanks, -ZhiYue Sun ___ Users mailing list Users@lists.ironpython.com http://lists.ironpyth

Re: [IronPython] WPF/IronPython event handlers question - multiple event handlers

2010-06-07 Thread Michael Foord
On 07/06/2010 21:26, Ken MacDonald wrote: Hi, I've got a whole stack of event handlers, assigned via the usual something like my_button.Click += button_was_clicked As it turns out, the initialization for the thing that has all these handlers may need to be run several times, and it seems

Re: [IronPython] WPF Controls with Ipy

2010-06-07 Thread Cronin, Ted
Yep, that's it, that's the behavior. Yes, it would be nice to have this behavior on by default for the Ipy templates. At least I have a workaround. Plans to streamline the AddRef process would be nice, too, looking forward to the next CTP, regardless of the aforementioned behaviors ;) Thank

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 3:16 PM, Dino Viehland wrote: > For example you could import sys, publish an attribute on it, and another > script could read it.  Or you could go in and change "min" or "max" in > __builtin__.  Or you could go and mutate some read/write static field in > the .NET framework.

Re: [IronPython] WPF/IronPython event handlers question - multiple event handlers

2010-06-07 Thread Lepisto, Stephen P
This link, http://msdn.microsoft.com/en-us/vcsharp/bb508935.aspx, has more information about event handlers and the order in which they are called. The order is not specified in the CLR reference and therefore you should not depend on a specific order. From: users-boun...@lists.ironpython.com

Re: [IronPython] WPF/IronPython event handlers question - multiple event handlers

2010-06-07 Thread Curt Hagenlocher
These are CLR-level issues. The first basically comes down to the fact that there's really no way to enumerate the handlers which have already been added to an event. As for the second, there is no contract that defines the order on which the handler will be called. But I suspect that the default i

Re: [IronPython] Question about IronPython tools for Visual Studio

2010-06-07 Thread Dino Viehland
There's currently no way to do this - we should add this to the TODO list and make it an option in Tools->Options. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Ashley Abraham Sent: Monday, June 07, 2010 3:16 PM To: Discussion of IronPython Sub

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Christos wrote: > Thanks Jeff, > This is the recommendation I was expecting to get. > I will run a high concurrency test on a single engine and single > compiled > code, with new scopes for each request and see where it takes me. > Do I need any locks on the engine itself when Getting the scope (

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: > On Mon, Jun 7, 2010 at 9:53 AM, Dino Viehland > wrote: > > This is correct and is definitely the recommended way to do this. >  The > > only reason to separate it out into separate ScriptEngine instances > is > > if you want isolation between the script engines themselves so that > >

[IronPython] WPF/IronPython event handlers question - multiple event handlers

2010-06-07 Thread Ken MacDonald
Hi, I've got a whole stack of event handlers, assigned via the usual something like my_button.Click += button_was_clicked As it turns out, the initialization for the thing that has all these handlers may need to be run several times, and it seems like I ended up with multiple copies of the sa

[IronPython] Question about IronPython tools for Visual Studio

2010-06-07 Thread Ashley Abraham
I am trying to use IronPython tools for Visual Studio and didn't know to how to start the IronPython Interactive console window with extra parameters, such as: -X:Frames, so that I can import numpy (along with ironclad). Thanks Ash ___ Users mailing list

Re: [IronPython] datetime.strptime is missing in IronPython?

2010-06-07 Thread Ken MacDonald
Hi Peter, I just did this myself; starting with the times that I parsed out from a TextBox, plus the yr/mo/day values from 'now': from System import DateTime*<== note: DateTime not datetime* new_time = DateTime(yr, mo, day, self.hh, self.mm, self.ss) I did find some other ways

[IronPython] datetime.strptime is missing in IronPython?

2010-06-07 Thread Peter Masiar
Seems like datetime in Ironpython has only strftime, but no strptime? IronPython 2.0.3 (2.0.0.0) on .NET 2.0.50727.3603 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> dir(datetime.datetime) ['CompareTo', '__add__', '__class__', '__delattr__', '__doc_

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Christos Pavlides
Thanks Jeff, I think I will start looking at the source code, but if Dino can give some definite answers it will speed up my evaluation tremendously. Christos -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy S

Re: [IronPython] Ironpython attribute validation

2010-06-07 Thread Ashley Abraham
Thanks, I'll try your suggestion. Ash On Mon, Jun 7, 2010 at 1:04 PM, Jeff Hardy wrote: > On Mon, Jun 7, 2010 at 11:33 AM, Ashley Abraham > wrote: > > is there any other module similar to Traits in IronPython which I can use > to > > explicitly declare the attributes and to do type validation?

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 11:55 AM, Christos Pavlides wrote: > Do I need any locks on the engine itself when Getting the scope (which could > be called from many threads at the same time)? The engine should handle those locks itself, but I don't have the source handy to check for sure. I'll let Din

Re: [IronPython] Ironpython attribute validation

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 11:33 AM, Ashley Abraham wrote: > is there any other module similar to Traits in IronPython which I can use to > explicitly declare the attributes and to do type validation?? It looks like Traits itself isn't dependent on zipimport (it depends on setuptools, which requires

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Christos Pavlides
Thanks Jeff, This is the recommendation I was expecting to get. I will run a high concurrency test on a single engine and single compiled code, with new scopes for each request and see where it takes me. Do I need any locks on the engine itself when Getting the scope (which could be called from ma

Re: [IronPython] Ironpython attribute validation

2010-06-07 Thread Ashley Abraham
is there any other module similar to Traits in IronPython which I can use to explicitly declare the attributes and to do type validation?? Thanks Ash On Mon, Jun 7, 2010 at 11:49 AM, Jeff Hardy wrote: > On Mon, Jun 7, 2010 at 10:41 AM, Ashley Abraham > wrote: > > Hi, > >In Python I am used

Re: [IronPython] Ironpython attribute validation

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 10:41 AM, Ashley Abraham wrote: > Hi, >    In Python I am used to using enthought's Traits to validate attributes > and explicitly declare variable types, is there anything similar to that in > IronPython. Also, when I try to import enthought's traits module (with > ironclad

Re: [IronPython] how to convert C# MarshalAs code to IronPython

2010-06-07 Thread Ashley Abraham
I'll try the ctypes... thanks for pointing me in the right direction and your help is much appreciated. Ash On Mon, Jun 7, 2010 at 10:02 AM, Jeff Hardy wrote: > On Sun, Jun 6, 2010 at 8:20 PM, Ashley Abraham > wrote: > > Jeff, > > I think I miss read your reply, what you are saying is that

[IronPython] Ironpython attribute validation

2010-06-07 Thread Ashley Abraham
Hi, In Python I am used to using enthought's Traits to validate attributes and explicitly declare variable types, is there anything similar to that in IronPython. Also, when I try to import enthought's traits module (with ironclad) in IronPython I get ImportError: No module named zipimport is th

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 9:53 AM, Dino Viehland wrote: > This is correct and is definitely the recommended way to do this.  The > only reason to separate it out into separate ScriptEngine instances is > if you want isolation between the script engines themselves so that > one piece of user code cann

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: > On Mon, Jun 7, 2010 at 7:14 AM, Christos Pavlides > wrote: > > I am thinking that it could be better if the ScriptEngine and > CompiledCode > > are thread safe, and if I create one static engine an one static > > CompliledCode then this will minimize the compile time since the > rule

[IronPython] IronPython 2.6 CodePlex Source Update

2010-06-07 Thread merllab
This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/67132. MODIFIED SOURCES $/IronPython/IronPython_Main/Runtime/Microsoft.Scripting/Hosti

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Jeff Hardy
On Mon, Jun 7, 2010 at 7:14 AM, Christos Pavlides wrote: > I am thinking that it could be better if the ScriptEngine and CompiledCode > are thread safe, and if I create one static engine an one static > CompliledCode then this will minimize the compile time since the rules will > have to be compil

Re: [IronPython] how to convert C# MarshalAs code to IronPython

2010-06-07 Thread Jeff Hardy
On Sun, Jun 6, 2010 at 8:20 PM, Ashley Abraham wrote: > Jeff, >     I think I miss read your reply, what you are saying is that if it based > on ctypes it will work in IronPython as well is it?? I thought you needed > IronClad and so on make it work. Yeah, with ctypes IronPython can call native c

[IronPython] Tim Wyatt is out of the office

2010-06-07 Thread Tim P. Wyatt
I will be out of the office starting 07/06/2010 and will not return until 09/06/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpd...@ppi.ca) ___ Users ma

[IronPython] Multi threaded engine

2010-06-07 Thread Christos Pavlides
I am investigating different possibilities regarding multithreading and Iron Python and I would appreciate some pointers. What I am currently doing is I allow the user to enter some pseudocode that will become some business logic running in a high traffic application server. The main properties

[IronPython] How should I install packages?

2010-06-07 Thread Matthew Wilson
I've got an all-python package that should be compatible with ironpython. It seems like distutils.setup doesn't exist though, so my original setup.py script won't work. I might tweak my setup.py so that when it can't find a distutils.setup, it goes into "ironpython mode" and then just manually co