Re: [IronPython] Building via AST

2010-04-14 Thread Dino Viehland
...@gmail.com wrote: Awesome. I will thanks. On Apr 12, 2010 7:49 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: This might be possible. If you wrap this all up in a PythonAst object (calling the constructor which takes a CompilerContext), call Bind on it then you should get

Re: [IronPython] Building via AST

2010-04-14 Thread Dino Viehland
) On Wed, Apr 14, 2010 at 3:32 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: The problem here is just that you actually have a nested code context when for the top-level code you just need a single global context. Replace the line: var

Re: [IronPython] 2.6.1 implements ssl module, but it crash...

2010-04-14 Thread Dino Viehland
My guess is that the exception we’re reporting is either of the wrong type or doesn’t have the right information. ssl.SSLSocket.read is catching SSLError and it looks like we’d probably throw a socket.SocketError instead. I’ve opened this bug:

Re: [IronPython] ssl server mode issue

2010-04-14 Thread Dino Viehland
Could you include the Python code which is doing the connections? Are you doing an IronPython to IronPython connection? Or are you connecting to a server or localhost running a server outside of IronPython? -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-

Re: [IronPython] 2.6.1 implements ssl module, but it crash...

2010-04-13 Thread Dino Viehland
qiuyin...@sohu.com wrote: import imaplib c = imaplib.IMAP4_SSL('imap.sohu.com', 993) c.login(myusername, mypassword) ipy.exe memory footprint increase to 170M... and crash soon. 2.6.1 and 2.6.1with.NET4 has the same problem Any idea what the crash is? Is it popping up the normal windows

Re: [IronPython] IronPython.Runtime.Types.PythonType Is not marked as Serializable Exception

2010-04-12 Thread Dino Viehland
() { Console.WriteLine(Did it virtually {0}, AppDomain.CurrentDomain.Idhttp://appdomain.currentdomain.id/); } public void DoIt() { Console.WriteLine(Did it {0}, AppDomain.CurrentDomain.Idhttp://appdomain.currentdomain.id/); } } On Tue, Mar 30, 2010 at 10:12 PM, Dino Viehland di

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
Nope – the DLR doesn’t have any support for building .NET types – dynamic or otherwise. If you’d like to just build an object which behaves dynamically I’d suggest looking at DynamicObject. You can just subclass it and override various Try* methods and you’ll have a dynamic object. If you

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
and load them via MEF (by means of the Export attribute). Is this just the wrong way to be thinking about this entirely? Or am I just missing something? On Mon, Apr 12, 2010 at 3:33 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Nope – the DLR doesn’t have any support

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
such that it is possible. On Mon, Apr 12, 2010 at 5:20 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Yes – there is the TypeGen class but really it’s just a thin wrapper around TypeBuilder w/ some helper APIs. If we were to implement it today it might just be extension

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-08 Thread Dino Viehland
It's not yet publicly available - the preview was given out exclusively to PyCon attendees on a CD. We'll be putting out an updated version within a couple of weeks after VS 2010 launches which is April 12th. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com]

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-08 Thread Dino Viehland
[A] R.A.Dvorského 601, Praha 10 [A] 10900, Czech Republic, Europe Dino Viehland wrote: It’s not yet publicly available – the preview was given out exclusively to PyCon attendees on a CD. We’ll be putting out an updated version within a couple of weeks after VS 2010 launches which is April 12^th

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Can Gencer wrote: I did some more digging around this, I tried using the wsgi.py found in FePy instead (and modifying it to fit with my webserver) and the results seem to be better, although not perfect. There seems to be a whole bunch of objects that are referenced from this root:

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: I'm seeing a lot of objects with !gcroots that start with DOMAIN(005F5F48):HANDLE(Strong):161100:Root:02913dac(System.Threading.Thread)- 0b93e034(System.Object[][])- 0b93e048(System.Object[])- 223edd34(System.Collections.Generic.List`1[[Microsoft.Scripting.Runtime.Dynami

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: I hate to ask the ETA for 2.7 is - fall, probably? End of year is what we've been saying. ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: This is 2.6.0. It looks like its one of the server's worker threads (I'm just using the built-in VS webserver), at least from a random sample of objects. Are the fixes in 2.6.1 RC1? Yes there are some fixes in 2.6.1 RC1 but obviously they're not working. Can you clear the

Re: [IronPython] ironpython window in Microsoft Office Application

2010-04-01 Thread Dino Viehland
David Jensen: Can an IronPython interpreter window be placed in an office application, such as Outlook 2007? Outlook 2007 is quite customizable. The forms can be modified. An IronPython interpreter window would be more useful than VBA, since VBA is not interactive (I have not used it much). I

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-01 Thread Dino Viehland
Can Gencer wrote: I am trying to use CherryPy through IronPython. I am using a custom web server written in C# and I am using the NWSGI handler available here (http://nwsgi.codeplex.com/) with some modifications to work with my custom web server instead of IIS. Everything works after some

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-01 Thread Dino Viehland
On Thu, Apr 1, 2010 at 4:17 PM, Can Gencer cgen...@gmail.com wrote: On Thu, Apr 1, 2010 at 7:27 PM, Dino Viehland di...@microsoft.com wrote: I tried this, ExceptionHelpers.DynamicStackFrames.Count seems to be constant at 1.. I'm not very familiar with windbg but I can certainly learn more

Re: [IronPython] IronPython.Runtime.Types.PythonType Is not marked as Serializable Exception

2010-03-30 Thread Dino Viehland
This works for me w/ 2.6. I've included my simple repro below which creates a new script engine in a remote app domain, loads my assembly in, runs some code which subclasses the MBRO base class, instantiates an instance of this class, and then calls it from a remote app domain. The key thing

Re: [IronPython] IsolateStorage.GetUserStoreForApplication throws SystemError in IronPython 2.6

2010-03-30 Thread Dino Viehland
methods in that api. :-( Any chance of fixing this for 2.6.1? Michael Michael 2010/3/16 Dino Viehland di...@microsoft.commailto:di...@microsoft.com A possible work around for this is: def f(): for i in xrange(200): try: return

Re: [IronPython] pickling python types

2010-03-24 Thread Dino Viehland
Yeah sorry for missing this and thanks for making sure we don't drop it. I would agree that this is a bug. I guess Int64.__module__ should really just be System and in general we shouldn't include the assembly name in the __module__ for built-in types. That makes it slightly less useful to

Re: [IronPython] Equals between RuntimeType and python type

2010-03-21 Thread Dino Viehland
It's a bug - It's already fixed for the final 2.6.1 release. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Sunday, March 21, 2010 7:11 AM To: users@lists.ironpython.com Subject: [IronPython] Equals between RuntimeType and

Re: [IronPython] Referencing extension modules from hosting

2010-03-18 Thread Dino Viehland
Jeff wrote: When using a C# PythonModule, there seem to be two ways to load it: from script using clr.AddReference and into the console by dropping it into the DLLs folder. However, there doesn't seem to be a straightforward way to load them in a hosting scenario. The best way I've found is

Re: [IronPython] normalizing parameters from a method call

2010-03-18 Thread Dino Viehland
The code for this is in MetaPythonFunction in the FunctionBinderHelper class. In particular GetArgumentsForRule is pretty close to what you're wanting - but this is all working at the meta-level and creating expressions which will be used for the call. But you can probably use that code as a

Re: [IronPython] Referencing extension modules from hosting

2010-03-18 Thread Dino Viehland
Jeff wrote: What about AppDomain.Current.GetAssemblies()? Not sure how that would play with a remoted engine, mind you. Oh, I didn't know about that. Go ahead and open a bug for this one as well. As long as there are no bad performance problems from reflecting over every assembly this would be

Re: [IronPython] abstract base classes

2010-03-17 Thread Dino Viehland
I didn't even realize this is broken. Probably 2.6.2 at the earliest - it looks like we had the test case which validates this disabled due to a generic needs to work on 2.6 bug. I've opened this more specific bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26499 Thanks for

Re: [IronPython] IsolateStorage.GetUserStoreForApplication throws SystemError in IronPython 2.6

2010-03-16 Thread Dino Viehland
A possible work around for this is: def f(): for i in xrange(200): try: return System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForSite() except: pass After enough invocations we will no longer use reflection to call it. We just need to add

Re: [IronPython] minor issue with types in error messages

2010-03-16 Thread Dino Viehland
We're picking up the .NET type name (we have a .NET type to represent NoneType) not the Python type name. You can also see it with () where we report String is not callable. It's simple enough to fix. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On

Re: [IronPython] Django, __unicode__, and #20366

2010-03-16 Thread Dino Viehland
Jeff wrote: On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehland di...@microsoft.com wrote: We could make % on a Unicode literal do something special much like we're doing for calls to unicode(...).  Alternately we could make % try to invoke __unicode__ before __str__ - but that would sometimes

Re: [IronPython] result of partial is not callable

2010-03-15 Thread Dino Viehland
Definitely a bug, and I don't think it's fixed in 2.6.1. I've opened http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26482 And there's more that needs to be done - they're not currently callable from Ruby either. Thanks for reporting this. From:

Re: [IronPython] Silverlight on the Windows 7 Phone

2010-03-11 Thread Dino Viehland
Michael wrote: I haven't followed the details of the Windows 7 phone closely but I do know it will include Silverlight. Any word on whether or not that will support IronPython applications? I don't think we know - it all depends on what CLR is being used in the phones. If it's the compact

Re: [IronPython] IronRuby 0.9 and IronPython 2.6~beta2 in Debian sid

2010-03-10 Thread Dino Viehland
Do you know when you'll do the next push? I'd suggest IronPython 2.6.1 and IronRuby 1.0 both of which we'll release right around VS 2010 shipping (mid-April). Were you successful in getting IronPython tests running or do you still need some help there? -Original Message- From:

Re: [IronPython] IronRuby 0.9 and IronPython 2.6~beta2 in Debian sid

2010-03-10 Thread Dino Viehland
CJ wrote: Thanks Dino. Those versions sound good to me. We haven't decided on the next release date. Will they be using their own DLR, or will they be depending on the one in .NET v4? They'll be running on both - we'll have the .NET 2.0 releases like we've always had and we'll also have

Re: [IronPython] Debian bug #516396

2010-03-10 Thread Dino Viehland
C.J. wrote: Hey folks, When running the ipy REPL on Debian from bash, ^Z suspends the current process, so using ^Z enter doesn't work as a quit key sequence. Where should I start poking to put a check for host shell and set the appropriate key sequence (^D)?

Re: [IronPython] Debian bug #516396

2010-03-10 Thread Dino Viehland
Dino wrote: C.J. wrote: Hey folks, When running the ipy REPL on Debian from bash, ^Z suspends the current process, so using ^Z enter doesn't work as a quit key sequence. Where should I start poking to put a check for host shell and set the appropriate key sequence (^D)?

Re: [IronPython] Silverlight: UnicodeEncodeError not defined and other encoding issues

2010-03-08 Thread Dino Viehland
Silverlight (at the CLR level) only includes UTF8 - no other encodings are available. That's the reason why latin_1 isn't available (which makes sense) and basically the reason why UnicodeEncodeError isn't available (which makes less sense as I think we're just missing the .NET exception to map

Re: [IronPython] How to reference enumeration in System.Windows.Input

2010-03-08 Thread Dino Viehland
Has Key moved from WindowsBase to PresentationCore? I'm not familiar with WPF but the docs says it's in WB: http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx If it has genuinely moved, is now type forwarded, and we're not picking it up my suggestion would be to add a

Re: [IronPython] CreateScriptSourceFrom ... database?

2010-03-04 Thread Dino Viehland
the PlatformAdaptionLayer class as you suggest -- but to be honest, I don't even know where to begin with that. Dino Viehland Wrote: Are the \r and \n getting escaped somehow? There should be no problem if the new lines are in the string the same as they would be in a file. Your solution generally sounds like

Re: [IronPython] Will 2.6.1 implement ssl module?

2010-03-04 Thread Dino Viehland
Maybe. I've been working on it the past couple of days. I'm working my way through the test cases and hopefully will be able to get them all working - but I'm making good progress even if it's been going slower than I'd have liked. -Original Message- From:

Re: [IronPython] CreateScriptSourceFrom ... database?

2010-03-01 Thread Dino Viehland
Are the \r and \n getting escaped somehow? There should be no problem if the new lines are in the string the same as they would be in a file. Your solution generally sounds like the right and easy one to go with. If you wanted a more complicated solution you could replace the

Re: [IronPython] clr.CompileModules(…) “cou ldn’t find member CompileModules”

2010-02-27 Thread Dino Viehland
Lukáš wrote: However, unfortunately it throws an syntax error: Ahh, this is the detail that was missing from your stack overflow post - but it isn't strictly required, it just made it a lot more obvious. The problem here is that exec is a keyword in Python so you can't use that as your

Re: [IronPython] clr.CompileModules(.) couldn't find member CompileModules

2010-02-25 Thread Dino Viehland
Oh, sorry, I was apparently confused. It looks like we still need to update the binaries for ASP.NET (see http://lists.ironpython.com/pipermail/users-ironpython.com/2010-February/012149.html). Jimmy, any idea on how this is progressing? From: users-boun...@lists.ironpython.com

Re: [IronPython] IronPython Studio won't install, why?

2010-02-24 Thread Dino Viehland
Hopefully you won't get too attached to IronPython Studio - in April we will be releasing IronPython Tools for Visual Studio which should generally be of higher quality, better supported, and will work w/ Visual Studio 2010 and IronPython 2.6. You can see what we're planning over in the PDFs

Re: [IronPython] IronJs optimizations. Can this be done in IronPython?

2010-02-24 Thread Dino Viehland
We've spent a little bit of time looking at generating optimized code (with guards + inlined operations) but it hasn't yet yielded any benefits over our current polymorphic inlining caching strategy. But that's probably just because we haven't pushed on it hard enough. I've also looked at

Re: [IronPython] IronPython Tools

2010-02-24 Thread Dino Viehland
Currently the best way to add a reference is to call clr.AddReference('assemblyname'). The analysis engine will pick up the call and include the assembly as being available in the list of imports. I'll take a look at the crashing bug. As for ASP.NET support we'll need to look into getting

Re: [IronPython] IronPython Studio won't install, why?

2010-02-24 Thread Dino Viehland
really good, Dino! Can't wait for April! :) Lukáš Duběda Director [T] +420 602 444 164 duber studio(tm) [M] i...@duber.czmailto:i...@duber.cz [W] http://www.duber.cz [A] R.A.Dvorského 601, Praha 10 [A] 10900, Czech Republic, Europe Dino Viehland wrote: Hopefully you won't get too attached

Re: [IronPython] Can't start executable created with pyc.py

2010-02-23 Thread Dino Viehland
I think you need to compile with /target:winexe so the app will start on a sta thread. Sent from my Android phone using TouchDown (www.nitrodesk.com) -Original Message- From: Neidhoo Xaphier [xaphi...@googlemail.com] Received: 2/23/10 4:17 AM To: users@lists.ironpython.com

Re: [IronPython] Running the IronPython tests (on Mono)

2010-02-23 Thread Dino Viehland
There's also run.py - that should work as well it'll run all of the IronPython specific tests. I'm not 100% sure that they'll all pass when run from run.py though. We're also looking at pushing our changes to the CPython test suite upstream. We'll be working on that over the next few

Re: [IronPython] Asymmetry in binary binding

2010-02-19 Thread Dino Viehland
There's no general way to be ensure the RHS will be invoked for a binding in particular due to the issues you've come up with. It's also problematic for IronPython to ask the RHS to do the binding when the LHS is not an IDMOP because the operations may not be symmetric. Really we'll need to add

Re: [IronPython] Internals documentation

2010-02-19 Thread Dino Viehland
of adding new language features would also show how IronPython works internally. Examples include adding new infix operators (PEP 225 or 211, say) or showing how to implement the with statement. Tristan On Thu, Feb 18, 2010 at 3:24 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote

Re: [IronPython] TraceBackFrame, f_globals, f_locals

2010-02-18 Thread Dino Viehland
This is a bug - f_locals / f_globals should be returning the module globals/locals but it's currently returning the locals for the actual compiled code. I've opened bug 26243: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26243 There's apparently 1 other sys.settrace bug that

Re: [IronPython] Bug fixes in Ipy 2.6.1

2010-02-18 Thread Dino Viehland
This is interesting - there's a .NET exception object which is keeping a traceback frame alive which is keeping the just_numbers list alive. We should clear out the local .NET exception and the memory will then be eligible for collection. The good news is that as soon as this method is no

Re: [IronPython] Internals documentation

2010-02-18 Thread Dino Viehland
For the DLR side of things you might find the DLR discussions to be useful: http://dlr.codeplex.com/Thread/List.aspx This post to the mailing list might also be useful - it covers implementing new modules in .NET for IronPython:

Re: [IronPython] [Noob]Ironpython catching Windows 'destroy' message, and posting confirm dialog

2010-02-18 Thread Dino Viehland
I assume there's just some event handler that you can hook up to a Python function. If you post the C# or VB code someone here can probably quickly translate it to IronPython. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Ken MacDonald Sent:

Re: [IronPython] Monkey-patching CLR types

2010-02-17 Thread Dino Viehland
Dino Viehland wrote: If you strongly type handler to a delegate type IronPython should convert the function to the delegate type on the call. Unfortunately it doesn't seem to :(. I repro'd that it doesn't on the desktop as well as in Silverlight; here's a desktop repro: import clr

Re: [IronPython] CPickle problem

2010-02-15 Thread Dino Viehland
This works if you run with the -X:Frames option. This is because namedtuple is using sys._getframe to find the calling module name and setting it on the created class. Alternately you could do this yourself: Point.__module__ = __name__ You could file a bug on this on CodePlex but to fix it

Re: [IronPython] CPickle problem

2010-02-15 Thread Dino Viehland
Michael wrote: Could the namedtuple API be changed to better support IronPython - perhaps an optional __module__ argument? That'd be one way to do it - but I'm not sure it helps much compared to just setting __module__ when you get it back. It would certainly be more discoverable though.

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
: Friday, February 12, 2010 2:24 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On 12/02/2010 03:37, Dino Viehland wrote: And it turns out this works great! We now pass all of the tests in test_str and test_unicode related to calling str/unicode and getting

Re: [IronPython] Adding new infix operators to IronPython

2010-02-15 Thread Dino Viehland
Hopefully updating the tokenizer and parser should be fairly obvious. Once you've done that you'll need to actually implement the operators themselves. If the implementation of these operators is effectively exactly the same as the normal binary operators it should be pretty easy - you just

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
, February 15, 2010 3:00 PM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Mon, Feb 15, 2010 at 3:57 PM, Dino Viehland di...@microsoft.com wrote: This was relatively easy, it was just work once Michael came up with the great idea.  But I do manage to get plenty

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
at 0x002B Foo: Foo object at 0x002C See http://docs.python.org/library/stdtypes.html#string-formatting-operations (esp. note 6) for reference. - Jeff On Mon, Feb 15, 2010 at 10:49 AM, Dino Viehland di...@microsoft.com wrote: This is now checked into the Main branch if anyone wants

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
, __unicode__, and #20366 On Mon, Feb 15, 2010 at 4:13 PM, Dino Viehland di...@microsoft.com wrote: Is the template string really a constant in the case that you care about? Yeah, it is, thankfully. I doubt there's a ton of cases where it occurs, and I really hope there aren't any where the format

Re: [IronPython] Monkey-patching CLR types

2010-02-15 Thread Dino Viehland
) { _element.AttachEvent(_event, new EventHandlerHtmlEventArgs((Actionobject, HtmlEventArgs)handler)); return null; } } -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Dino

Re: [IronPython] Blocker in Ipy 2.6.1 RC1

2010-02-12 Thread Dino Viehland
Thanks for reporting this - this should pbe easy enough to fix but I probably won't get to it until after PyCon. Glad to hear startup improved some more especially because I wasn't expecting much improvement because you're pre-compiled. From: users-boun...@lists.ironpython.com

Re: [IronPython] Improvements to the hosting APIs

2010-02-12 Thread Dino Viehland
Jeff wrote: Hi all, Dave F. mentioned on Twitter that he was looking at the hosting APIs, and the made the mistake of accepting my unsolicited advice. So, here are a couple of my wishes (both form NWSGI): * A version of PythonOps.MakeException that doesn't take a code context - It's not

Re: [IronPython] Improvements to the hosting APIs

2010-02-12 Thread Dino Viehland
Jeff wrote: On Fri, Feb 12, 2010 at 1:47 PM, Dino Viehland di...@microsoft.com wrote: Jeff wrote: * A version of PythonOps.MakeException that doesn't take a code context - It's not hard to create one, but every time I do I feel like I'm doing something wrong. * An easy way to wrap

Re: [IronPython] IronPython 2.6.1 RC1, ctypes, and c_int.value

2010-02-11 Thread Dino Viehland
Actually this looks like a bug in IronPython. ctypes.addressof(msvcrt.system) is returning the wrong value - in CPython it's returning the address which points to the function. In IronPython it's returning the address of the function it's self. Hopefully the real code is doing something more

Re: [IronPython] IronPython 2.6.1 RC1, ctypes, and c_int.value

2010-02-11 Thread Dino Viehland
I've created http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26185 but I already have a fix for this. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, February 11, 2010 10:14 AM To: Discussion

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
Vernon wrote: You need the 'byte' class for Python 3 anyway. Implement it now. Done! Assuming you mean bytes it’s in 2.6 already. Now if everyone would upgrade their code to use b’’ :) A small sample... code x.py import sys u = u'1234\u00f6' s = '1234' x = str(s) print type(x),

Re: [IronPython] IronPython 2.6.1 RC1, ctypes, and c_int.value

2010-02-11 Thread Dino Viehland
...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, February 11, 2010 10:40 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 2.6.1 RC1, ctypes, and c_int.value I've created http://ironpython.codeplex.com/WorkItem/View.aspx

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
Oh, I should also add I think Michael's proposed fix makes this code work correctly. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, February 11, 2010 11:07 AM To: Discussion

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
exception case where CPython doesn't throw. So I'm inclined to go with this fix. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, February 10, 2010 9:38 AM To: Discussion of IronPython

Re: [IronPython] Django, __unicode__, and #20366

2010-02-10 Thread Dino Viehland
To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehland di...@microsoft.com wrote: Messing with identity starts to get really scary and I'd rather not go there - I'm sure there will be lots of edge cases which will be broken

Re: [IronPython] threading.thread sometimes forced termination!

2010-02-08 Thread Dino Viehland
That Thread.Abort should be fine - we should only ever get to it if someone else already started aborting the thread. Can you attach a .NET debugger that logs all the exceptions? -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com]

Re: [IronPython] Databinding a color in the datagrid in Silverlight

2010-02-08 Thread Dino Viehland
On the IValueConverter side of things: I haven't debugged through this but I have a guess as to what could be going on. When we emit a type via reflection I don't believe it's available via Type.GetType - which is the way types usually get loaded by name. If you attach a debugger I think

Re: [IronPython] Hosting DLR under ASP.NET

2010-02-02 Thread Dino Viehland
I would recommend: Keep 1 ScriptRuntime/ScriptEngine (as Jimmy mentions you can repeatedly grab the SE off the SR) Compile the code to a CompiledCode object and repeatedly execute it rather than re-compiling and executing Create a new ScriptScope for each request That's

Re: [IronPython] Django, __unicode__, and #20366

2010-01-31 Thread Dino Viehland
I'll take a look and see what breaks if we call __unicode__ when it's defined when the user calls str/unicode. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Sunday, January 31, 2010 11:25 AM

Re: [IronPython] bug with closure in coroutine

2010-01-27 Thread Dino Viehland
It's so easy to fix it's actually already fixed for 2.6.1 :) Thanks for reporting it though. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Ronnie Maor Sent: Wednesday, January 27, 2010 8:17 AM To: Discussion of IronPython Subject:

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2010-01-27 Thread Dino Viehland
My bad, I forgot the magic marker which includes the commit message. This was just an integration of all the changes from Main that have Gone in over the past few months (which have for the most part had commit messages) to the 2.6 servicing branch. The only differences were to avoid binary

Re: [IronPython] to invoke ironpython from runtime in .NET framework 4.0

2010-01-25 Thread Dino Viehland
You need to download the version of IronPython which is built for .NET 4.0: http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28125 That'll just work and it'll support interop w/ C# 4.0. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On

Re: [IronPython] IronPython in Visual Studio 2008

2010-01-20 Thread Dino Viehland
of scripts). From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, January 20, 2010 2:28 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython in Visual Studio 2008 On 20/01/2010 02:34, Dino Viehland wrote: Does

Re: [IronPython] IronPython in Visual Studio 2008

2010-01-19 Thread Dino Viehland
Does Wing now work w/ IronPython for debugging now that we added sys.settrace in 2.6? From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Vernon Cole Sent: Tuesday, January 19, 2010 1:17 PM To: Discussion of IronPython Subject: Re: [IronPython]

Re: [IronPython] IronPython.Modules.dll bug when access from Delphi

2010-01-13 Thread Dino Viehland
The attachment was deleted - can you post it somewhere? For example you could open a bug on our CodePlex site and attach it. Also do you have VisualStudio installed? If so you could attach the debugger to your process and send the stack trace of where it's hanging. -Original

Re: [IronPython] IronPython.Modules.dll bug when access from Delphi

2010-01-13 Thread Dino Viehland
://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25933 Unfortunately, I have only VS Express so I cannot attach debugger to a process. -- -- Lukáš Dino Viehland wrote: The attachment was deleted - can you post it somewhere? For example you could open a bug on our CodePlex site and attach

Re: [IronPython] IronPython.Modules.dll bug when access from Delphi

2010-01-13 Thread Dino Viehland
of IronPython Subject: Re: [IronPython] IronPython.Modules.dll bug when access from Delphi IpyTest is compiled IpyTest.dpr by Delphi 7. Yes, it hosts CLR. I'll try the windbg. -- -- Lukáš Dino Viehland wrote: Ok, Dave was also somehow able to get the attachment and send it to me... What

Re: [IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Dino Viehland
If you really want to use .NET monitors you can code it up as a try/finally: Monitor.Enter(m_object) try: if ...: ... finally: Monitor.Exit(m_object) If you'd like to do a slightly more Pythonic lock you could do: import threading x = threading.Lock() with x:

Re: [IronPython] Converting C# to Python ... the lock() keyword?

2010-01-11 Thread Dino Viehland
implementations (specifically, you can't mix and match)? I can live with the Monitor for now I think. Thanks again! -Sandy On 1/11/2010 2:23 PM, Dino Viehland wrote: If you really want to use .NET monitors you can code it up as a try/finally: Monitor.Enter(m_object) try

Re: [IronPython] IronPython 2.6 final: Debugging not working?

2010-01-11 Thread Dino Viehland
What does program.py look like? Is it all top-level code or does it also contain functions and classes? And are the break points in the top-level code or are they in functions/classes? I ask because I can't seem to hit breakpoints in top-level code at all but so far I reliably hit them in

Re: [IronPython] IronPython 2.6 final: Debugging not working?

2010-01-11 Thread Dino Viehland
Thanks! In that case I think I understand what's going on and it should be fairly simple to fix. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Joshua Kramer Sent: Monday, January 11, 2010 7:57 PM To:

Re: [IronPython] Custom module storage.

2010-01-10 Thread Dino Viehland
Using Python's import hooks is one way to go and is also nice because you can do it all from Python as well - see PEP 302 which is at http://www.python.org/dev/peps/pep-0302/. You can also subclass ScriptHost and provide a custom PlatformAdaptionLayer which re-maps file I/O to the database.

Re: [IronPython] can't execute method in globals

2010-01-06 Thread Dino Viehland
(MyDemoProject,PublicKey=blahblahblah)] and [assembly: InternalsVisibleToAttribute(IronPython,PublicKey=blahblahblah)] but it did not succeed... is there a way to make the internals visible to the scripts? Ernesto El 05/01/2010 17:29, Dino Viehland escribió: Is there anything different from

Re: [IronPython] IronPython 2.0.3

2010-01-06 Thread Dino Viehland
Yep, 2.0.3 is the right version to target for 2.5 compatibility. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Perez, Justin Sent: Wednesday, January 06, 2010 6:48 AM To: users@lists.ironpython.com Subject:

Re: [IronPython] IronPython 2.0.3

2010-01-06 Thread Dino Viehland
Keith wrote: I was wondering if it might not be better (even possible) to merge the version compatibility into a switch, so people would optionally use a targetVersion flag or some-such. Part of the difference between versions isn't simply language, it's outright bug corrections and

Re: [IronPython] IronPython 2.0.3

2010-01-06 Thread Dino Viehland
not a great space to be in, and then end-users have to hunt for the IronPython version to use, as seen here. -Original Message- From: Dino Viehland di...@microsoft.com Sent: Wednesday, January 06, 2010 10:23 To: Discussion of IronPython users@lists.ironpython.com Subject: Re

Re: [IronPython] Apparent bug with redirecting output in IronPython 2.6

2010-01-06 Thread Dino Viehland
It's a bug - thanks for reporting it! I've opened CodePlex issue 25861: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25861 It'll be fixed for 2.6.1, we're just grabbing our code context from the wrong spot. From: users-boun...@lists.ironpython.com

Re: [IronPython] can't execute method in globals

2010-01-05 Thread Dino Viehland
What is gs in InitDbUtils, should that be gl? Also can you include the line of code where you're actually executing the code from your host? Are you setting ScriptRuntime.Globals to _scriptScope? Because I think Globals may have changed meaning between 1.1 and 2.0/2.6. In 2.x Globals is

Re: [IronPython] can't execute method in globals

2010-01-05 Thread Dino Viehland
Is there anything different from the code below vs. what you're trying to do? Because this works for me in 2.6. It would seem like the only possible difference (based upon the error) is that there's some access ExecuteQuery on an MSSqlServerUtils object which I'm not seeing. If that's the

Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Dino Viehland
This is definitely a bug - we're leaking our stack frames on the CLR's finalizer thread when we swallow exceptions while closing the generator. I think this is the correct fix but I haven't fully tested it yet, in our generator we have the code below but it's missing the assignment of null to

Re: [IronPython] Memory leaks in Ipy 2.6

2009-12-28 Thread Dino Viehland
...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.commailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, December 28, 2009 9:47 PM To: Discussion of IronPython Subject: Re: [IronPython] Memory leaks in Ipy 2.6 This is definitely a bug - we're leaking our stack frames

Re: [IronPython] LINQ from IronPython

2009-12-22 Thread Dino Viehland
Jeff wrote: This is one of those things that I've been pondering for a while, so I thougt I'd throw it out there and see what everyone else thinks (I fully expect to hear that I'm crazy...). I'd like to be able to query an existing data model (Entity Framework in this case, but that's not

<    1   2   3   4   5   6   7   8   9   10   >