[IronPython] Frames in IronPython

2008-12-30 Thread Jeff Hardy
I don't know what the feature list is going to be for 2.1, but I'd like to see frame objects near the top. Almost every piece of Python code I've tried uses them in some way. Often it's for debugging purposes (and can be worked around), but not always. Trac has this lovely piece of code: @staticme

Re: [IronPython] Hosting IronPython in Powershell

2008-12-30 Thread Stephen Ng
Thanks for the help I'll get the pdf version of the book this weekend and read up to try to get more of a clue. Am I using Invoke-GenericMethod correctly? PS C:\Program Files\IronPython 2.0> & 'C:\Program Files\IronPython 2.0\Invoke-GenericMethod.ps1' $py Execute String '3' Exception calling

Re: [IronPython] Embedding IronPython

2008-12-30 Thread Michael Foord
Hello Josh, Sorry for the delayed reply - life is hectic at the moment and I'm still copy editing IronPython in Action. I've copied your email to the IronPython list as I don't know whether the CreateScope and other methods of the ScriptEngine are thread safe. My instinct would be to say no,

Re: [IronPython] Hosting IronPython in Powershell

2008-12-30 Thread Michael Foord
Curt Hagenlocher wrote: This is a PowerShell error. The DLR hosting interfaces overload Execute (and other methods) with generic and non-generic versions, and it appears that PowerShell won't allow calling of the generic version. For this to work, you'll need to find a way to force PowerShell

Re: [IronPython] Hosting IronPython in Powershell

2008-12-30 Thread Curt Hagenlocher
This is a PowerShell error. The DLR hosting interfaces overload Execute (and other methods) with generic and non-generic versions, and it appears that PowerShell won't allow calling of the generic version. For this to work, you'll need to find a way to force PowerShell to use the non-generic over

Re: [IronPython] Hosting IronPython in Powershell

2008-12-30 Thread Stephen Ng
Thanks, dropping all the dlls from the IronPython2 directory into the GAC gets me a little further (adding to the path didn't work). Sorry to need to be led by the hand...now I get: PS C:\Program Files\IronPython 2.0> [reflection.assembly]::loadFrom("C:\Program Files\IronPython 2.0\IronPython.dll"

Re: [IronPython] Problems in module binascii

2008-12-30 Thread Carlos Alberto Costa Beppler
Thanks. On Tue, Dec 30, 2008 at 15:19, Curt Hagenlocher wrote: > It throws a NotImplementedException because it hasn't been implemented yet. > :) > You can vote on this feature > at http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=17465 > > On Tue, Dec 30, 2008 at 9:13 AM, Carlos

Re: [IronPython] Problems in module binascii

2008-12-30 Thread Curt Hagenlocher
It throws a NotImplementedException because it hasn't been implemented yet. :) You can vote on this feature at http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=17465 On Tue, Dec 30, 2008 at 9:13 AM, Carlos Alberto Costa Beppler < bepp...@gmail.com> wrote: > Hello. > > The function

[IronPython] Problems in module binascii

2008-12-30 Thread Carlos Alberto Costa Beppler
Hello. The function crc32 contained on module binascii requires 2 arguments, but the python docs says that the second argument is optional. Then a was looking for the implementation and found it in binascii.cs file on IronPython.Modules. But the implementation of this function and others (a2b_qp,

Re: [IronPython] Problems with hashlib and threading

2008-12-30 Thread Curt Hagenlocher
I'm going to guess that this is because we use a static instance of MD5CryptoServiceProvider to do the hashing, something which may not be thread-safe. It looks like all of the IronPython crypto implementations do the same thing, so the SHA functions may have a similar issue. Please file this as a

Re: [IronPython] Bug in Django's lazy functions

2008-12-30 Thread Curt Hagenlocher
On Mon, Dec 29, 2008 at 11:35 AM, Jeff Hardy wrote: > On Mon, Dec 29, 2008 at 9:43 AM, Curt Hagenlocher > wrote: > > > There may also be a problem as a result of str == unicode; in fact, > there's > > a commented-out assertion in line 175 of functional.py that specifically > > breaks because thi

Re: [IronPython] Hosting IronPython in Powershell

2008-12-30 Thread Curt Hagenlocher
This looks like a classic and continually frustrating Fusion problem. (Fusion is the .NET loader.) When you use Assembly.LoadFrom, it doesn't automatically add the assembly's directory into any kind of search path. So the dependencies of IronPython.dll can't automatically be found to be loaded.

Re: [IronPython] How do you call a generic method that requires more than one generic argument?

2008-12-30 Thread Dan Eloff
On Tue, Dec 30, 2008 at 11:07 AM, Curt Hagenlocher wrote: > Did you AddReference System.Core.dll? > Thanks, that was it. Second time that's got me. -Dan ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ir

Re: [IronPython] How do you call a generic method that requires more than one generic argument?

2008-12-30 Thread Curt Hagenlocher
Did you AddReference System.Core.dll? On Tue, Dec 30, 2008 at 7:54 AM, Dan Eloff wrote: > >>> from System import Action > >>> f = lambda x, y: x+y > >>> Action[object, object](f) > ValueError: The type or method has 1 generic parameter(s), but 2 > generic argument(s) were provided. A generic arg

[IronPython] How do you call a generic method that requires more than one generic argument?

2008-12-30 Thread Dan Eloff
>>> from System import Action >>> f = lambda x, y: x+y >>> Action[object, object](f) ValueError: The type or method has 1 generic parameter(s), but 2 generic argument(s) were provided. A generic argument must be provided for each generic parameter. >>> Action[(object, object)](f) ValueError: The ty

Re: [IronPython] Memory Leak in CreateScriptSource?

2008-12-30 Thread Dody Gunawinata
I reported this bug on codeplex http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20399 On Fri, Dec 26, 2008 at 5:36 PM, Dody Gunawinata wrote: > With the GC.Collect lines removed, this is how it looks like (after > counting to 40,000). I started the tasklist command after around