Re: [IronPython] Mercurial Status

2009-05-04 Thread Dino Viehland
You mention bug #22258 - is Mercurial using byte array notation wherever they intend to have a non-Unicode string? I'm just curious because there may be a lot of other subtle Unicode issues. For example: foo = open('foo', 'w+b') b = buffer(u'hello world', 6) foo.write(b) foo.close() in CPython

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Dino Viehland
This is actually a CLR bug. A simple repro of the issue is below if anyone is curious. The CLR team has resolved this bug as Won't Fix and says a workaround is available. The only workaround I can think of is explicitly queueing the work item to the thread pool and provide an object for you

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Dino Viehland
...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, May 04, 2009 3:18 PM To: Discussion of IronPython Subject: Re: [IronPython] Making asynchronous calls in IronPython This is actually a CLR bug. A simple repro of the issue is below if anyone is curious. The CLR team has resolved this bug

[IronPython] bytes behavior on 2.6...

2009-05-05 Thread Dino Viehland
We have an active bug against our new bytes implementation for 2.6. Currently if you do: b'***'[0] you get back 42 as an int. This matches the 3.0 behavior of bytes but in CPython 2.6 you get back '*'. We could choose to match either form and then we could change it for 3.0. But because

Re: [IronPython] Mercurial Status

2009-05-05 Thread Dino Viehland
Sent: Tuesday, May 05, 2009 4:58 PM To: Discussion of IronPython Subject: Re: [IronPython] Mercurial Status On Mon, May 4, 2009 at 2:13 PM, Dino Viehland di...@microsoft.com wrote: You mention bug #22258 - is Mercurial using byte array notation wherever they intend to have a non-Unicode

Re: [IronPython] bytes behavior on 2.6...

2009-05-05 Thread Dino Viehland
! -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Tuesday, May 05, 2009 2:50 PM To: Discussion of IronPython Subject: Re: [IronPython] bytes behavior on 2.6... Dino Viehland wrote: We have an active

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
Where does ironpython_console.py come from? There is no IronPythonConsole class anymore so knowing what exactly the .py file is trying to do would be helpful. But likely you want to map existing things we're looking for into the Microsoft.Scripting.Hosting.Shell namespace which lives in

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
to see which module I am refering to see http://ipython.scipy.org/moin/PyReadline/Intro *cheers And thank you On Wed, May 6, 2009 at 10:39 AM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Where does ironpython_console.py come from? There is no IronPythonConsole class

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
This one’s a little more complex. It looks like there’s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a ConsoleOptions object. That’d look something like: import clr

Re: [IronPython] Assertion failure in IPy 2.6 while running Django

2009-05-06 Thread Dino Viehland
: Wednesday, May 06, 2009 4:37 PM To: Discussion of IronPython Subject: Re: [IronPython] Assertion failure in IPy 2.6 while running Django On Sun, May 3, 2009 at 3:59 PM, Dino Viehland di...@microsoft.com wrote: Do you happen to know what baseName is when the assertion is hit? Hit this again

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
On Wed, May 6, 2009 at 2:48 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: This one’s a little more complex. It looks like there’s no longer a writable IConsole property. Instead it looks like you need to create a PythonCommandLine object and then pass in a ScriptEngine

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
'set_Output' On Wed, May 6, 2009 at 5:31 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: The last line should probably be: cmdLine.Run(Python.CreateEngine(), IronPythonWrapper(), PythonConsoleOptions()) I thought IronPythonWrapper was an instance but it looks like it’s

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-06 Thread Dino Viehland
] Compiling IronPythonConsole.exe hmm I did a search through the code there is no set_Output and I searched Output and set_ as separate search nothing... Now I am confused Anyway I really appreciate your help :-) *cheers Andrew On Wed, May 6, 2009 at 6:32 PM, Dino Viehland di...@microsoft.commailto:di

Re: [IronPython] Compiling IronPythonConsole.exe

2009-05-07 Thread Dino Viehland
understand I need to create the function get_Output set_Output etc but in order for them to return the values would it be def set_Output(): set_Output Anyway once again thank you btw it isn't my code its a IronPython module I need to work :-) On Wed, May 6, 2009 at 7:12 PM, Dino Viehland

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2009-05-07 Thread Dino Viehland
And even after that there's still more bugs of yours to fix! :) -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Thursday, May 07, 2009 3:54 PM To: Discussion of IronPython Subject: Re:

Re: [IronPython] MissingMemberException on 2.6

2009-05-11 Thread Dino Viehland
When you say you're running the 2.6 interpreter does that mean you're using 2.6 to compile and then run against 2.0? If so that probably won't work. Is there any chance you could attach a debugger to the dieing process and get the managed stack trace where things are blowing up?

Re: [IronPython] FePy status update

2009-05-11 Thread Dino Viehland
On #4 I'm going to check-in the fix today - sorry for the delay! -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Seo Sanghyeon Sent: Saturday, May 09, 2009 3:05 AM To: Discussion of IronPython Subject: [IronPython] FePy

Re: [IronPython] Inspect Module

2009-05-13 Thread Dino Viehland
This will should be fixed in tomorrow's source drop. I have a check-in which removes sys._getframe unless the -X:Frames or -X:FullFrames options are passed. When one of those are passed sys._getframe works for any value and if -X:FullFrames is passed then you can get locals from the frames

Re: [IronPython] Sympl Language Sample and Walkthrough Document

2009-05-14 Thread Dino Viehland
One of the really cool things about Sympl that I think is worth emphasizing is the version that's implemented in IronPython. Not only is it the 1st language I know if implemented in IronPython but it's able to do cool stuff like create IDynamicMetaObjectProvider implementation from Pythons

Re: [IronPython] Execfile in IronPython 2.0 slower then 1.1

2009-05-14 Thread Dino Viehland
I believe there's a code gen issue here w/ the DLR. In 1.x we generate 3 local variables in the gigantic method that this ends up generating. In 2.0 we generate a bigger method but more importantly we're generating 10002 local variables which causes the JIT to spend a long time analyzing those

Re: [IronPython] Doing Simple Math In Silverlight

2009-05-14 Thread Dino Viehland
I think you want something like: result0 = int(inputNum1.Text) + int(inputNum2.Text) From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Evans Sent: Thursday, May 14, 2009 3:19 PM To: Discussion of IronPython Subject: [IronPython] Doing

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2009-05-15 Thread Dino Viehland
This should probably look more like the CTypes changes below but because I just ran the push script on a machine it doesn't usually run on there's a bunch of extra noise. Fixes a bunch of issues w/ ctypes and makes a module that’s available by default. We now pass 318 out of 366 tests

Re: [IronPython] can anyone help me with COM access in ironpython?

2009-05-15 Thread Dino Viehland
[note my knowledge of this area is fuzzy at best but this is my understanding. Maybe someone from the team can explain this better or give more accurate information if I get anything wrong]. The reason why these are so different is to date IronPython has basically gotten it's COM interop

Re: [IronPython] mmap, csv, others

2009-05-19 Thread Dino Viehland
Harry had started implementing _csv but I think he's stalled out on playing w/ __clrtype__. No one here has touched mmap - I believe .NET 4.0 will have a managed wrapper around memory mapped files which would give us a chance to do it in the future but until then we wouldn't even think about it.

Re: [IronPython] with_statement in IronPython 2.6x

2009-05-19 Thread Dino Viehland
There's regular source drops which you can build your self but there hasn't been a new binary release. We are trying to get beta 1 out this week though. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Elise Langham (Elanit) Sent: Tuesday, May

[IronPython] IronPython 2.6 Beta 1 Released

2009-05-20 Thread Dino Viehland
Hello Python Community, We're pleased to announce the release of IronPython 2.6 Beta 1. As you might imagine, this release is all about supporting new CPython 2.6 features such as the 'bytes' and 'bytearray' types (PEP 3112), decorators for classes (PEP 3129), advanced string formatting (PEP

Re: [IronPython] Where can i find IronPython 2.0.1 Document?

2009-05-20 Thread Dino Viehland
If you go to the DLR site (http://dlr.codeplex.com) there are docs/specs there (http://dlr.codeplex.com/Wiki/View.aspx?title=Docs%20and%20specs). They're not in CHM form but you might find they're actually much better than the CHM. From: users-boun...@lists.ironpython.com

Re: [IronPython] Performance of dir

2009-05-24 Thread Dino Viehland
You probably can - dir is currently not optimized at all. Instead it's designed to ensure consistent results with member access. Due to that it does do more reflection than is strictly necessary. So you can do reflection and translate operator methods to __add__ and friends and it may be faster

Re: [IronPython] IPython is breathing but there's a compile() problem

2009-05-26 Thread Dino Viehland
This is probably a dup of 12907 http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=12907 That being said the more test cases for this the better - this option isn't really documented. Also if anyone can provide insight into exactly how this is supposed to behave that'd be great.

Re: [IronPython] C# 4.0 DynamicObject in IronPython

2009-05-27 Thread Dino Viehland
We actually discovered there's a bug in IronPython that prevents DynamicObject from working right. Member access is fixed in the current IronPython builds but those probably aren't compatible w/ Beta 1 due to some DLR breaking changes. From: users-boun...@lists.ironpython.com

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2009-05-28 Thread Dino Viehland
With all the other releases it's been tough to find the time to work on 2.0.2. My current plan is to finish it up in about 2 weeks (it would be sooner but I'm taking most of next week off). -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-

Re: [IronPython] Minor bug in conversion of str to bytes?

2009-05-29 Thread Dino Viehland
Unfortunately there's probably going to continue to be a bunch of corner cases related to bytes/str/unicode until we move to 3.0. But hopefully we can come up w/ reasonable workarounds for most of them. In this case it seems like we should define __str__ on bytes and make it return a Unicode

Re: [IronPython] Minor bug in conversion of str to bytes?

2009-05-29 Thread Dino Viehland
] On Behalf Of Michael Foord Sent: Friday, May 29, 2009 11:34 AM To: Discussion of IronPython Subject: Re: [IronPython] Minor bug in conversion of str to bytes? Dino Viehland wrote: Unfortunately there's probably going to continue to be a bunch of corner cases related to bytes/str/unicode until we

Re: [IronPython] VS Support/Intelllisense for IronPython

2009-06-11 Thread Dino Viehland
We've made some attempts in the past (e.g. IronPython Studio) but there's no longer any active development for intellisense. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Adam Brand Sent: Thursday, June 11, 2009 7:35 AM To: Discussion of

Re: [IronPython] [Python-Dev] Exception for setting attributes of built-in type

2009-06-15 Thread Dino Viehland
Guido wrote: I should add that this policy is also forced somewhat by the existence of the multiple interpreters in one address space feature, which is used e.g. by mod_python. This feature attempts to provide isolation between interpreters to the point that each one can have a completely

Re: [IronPython] How do I SetVariable to None?

2009-06-15 Thread Dino Viehland
You probably need to actually cast null to (object). I suspect you could be getting the ObjectHandle overload which is used for remoting purposes. I'm a little surprised C# doesn't report this as ambiguous but then again IronPython doesn't either and selects the ObjectHandle overload just like

Re: [IronPython] Embedding IronPython and calling python functions from C#

2009-06-15 Thread Dino Viehland
What about the code which is actually running the code that def OnConnect lives in? I would expect you have either: engine.ExecuteFile(..., scope) or: code = engine.CreateScriptSource*(...) cc = code.Compile() cc.Execute(scope) or code = engine.CreateScriptSource*(...)

Re: [IronPython] Embedding IronPython and calling python functions from C#

2009-06-15 Thread Dino Viehland
Dino Viehland wrote: What about the code which is actually running the code that def OnConnect lives in? I would expect you have either: engine.ExecuteFile(..., scope) or: code = engine.CreateScriptSource*(...) cc = code.Compile() cc.Execute(scope) or code

Re: [IronPython] Embedding IronPython and calling python functions from C#

2009-06-16 Thread Dino Viehland
a script on it, I can't (in)directly use them from script. The other solution would be to have the server object be part of every function call to scripts, but that sounds kinda silly... Patrick Dino Viehland wrote: You can set the variables in ScriptRuntime.Globals but then the user will need

Re: [IronPython] os.strerror

2009-06-17 Thread Dino Viehland
Or there's always: import nt import errno for x in dir(errno): val = getattr(errno, x) if type(val) is int: print ('case PythonErrorNumber.%s: return ' + nt.strerror(val) + ';') % x :) -Original Message- From: users-boun...@lists.ironpython.com

Re: [IronPython] __module__ of FunctionType

2009-06-17 Thread Dino Viehland
Looks like this is because type.__module__ is not a data descriptor. I believe I have a fix. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Seo Sanghyeon Sent: Wednesday, June 17, 2009 3:04 AM To: Discussion of

Re: [IronPython] clarification on current state of embedding

2009-06-18 Thread Dino Viehland
Does everything basically work for you if you tell VS to build to target 3.5? What I expect you'll find is that you can just build and target 3.5 and it'll all work on someone's machine w/ 2.0 installed. The important thing to watch out for is not adding references to assemblies that aren't

Re: [IronPython] __module__ of FunctionType

2009-06-23 Thread Dino Viehland
This is now fixed in the latest sources (and strerror is now implemented as well). -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Seo Sanghyeon Sent: Wednesday, June 17, 2009 3:04 AM To: Discussion of IronPython

Re: [IronPython] Sandbox AppDomains and 'Object has been disconnected or does not exist at the server' exceptions

2009-06-26 Thread Dino Viehland
Tomas has checked in a fix for this. Basically what's going on is that w/ remoting you have a lease which keeps the remote objects alive. If that lease expires (by default it's 5 or 15 minutes or something) then the object becomes unreachable. The fix was to opt-out of the leasing system.

Re: [IronPython] Bazaar on IronPython

2009-06-29 Thread Dino Viehland
Good work, it's very cool to see this - if you see an existing bug or open a new please make sure to mention that it effects Bazaar and we'll treat it with a higher priority. In general that goes for any large body of existing Python code. -Original Message- From:

Re: [IronPython] Bazaar on IronPython

2009-07-02 Thread Dino Viehland
Martin wrote: However I don't see any information on the site about how you want fixes provided, and messages likes this: http://lists.ironpython.com/pipermail/users-ironpython.com/2009- April/010114.html seem to imply that not only can you not take submissions, but you can't even look at

Re: [IronPython] Exception for setting attributes of built-in type

2009-07-02 Thread Dino Viehland
Seo wrote: Exception for setting attributes of built-in type differs between CPython and IronPython. This is not purely theoretical, as zope.interface tries to set Implements declaration as __implemented__ attribute of built-in type object, and excepts TypeError. Python 2.6.1 object.flag =

Re: [IronPython] - Custom interactive console

2009-07-08 Thread Dino Viehland
That's the best way to do this stuff via the hosting APIs. For the 2.6 builds of the 2 bugs in that mail at least 1 of them has been fixed (22064) and it looks like 21881 has also been fixed - or at least we don't get the null object ref exception that we used to get. I'm not sure if the

Re: [IronPython] Bazaar on IronPython

2009-07-10 Thread Dino Viehland
Martin wrote: * Even non re.RE_Pattern objects shouldn't confuse warnings filtering (Regression in IronPython 2.6 beta 1) (too crazy for a bug entry) * Require the zlib module [workitem:2590] (other missing or broken modules not as crucial) * Making sys._getframe equal to None by default

Re: [IronPython] Problem with Creating Executable using SharpDevelop

2009-07-10 Thread Dino Viehland
In general you need IronPython to be present to run IronPython apps - even if they're compiled. And IronPython will need to be next to the app unless IronPython has been installed into the GAC (which we do not do by default). Also you probably want to include IronPython.Modules.dll as well in

Re: [IronPython] Problem with Creating Executable using SharpDevelop

2009-07-10 Thread Dino Viehland
at 11:03 AM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: In general you need IronPython to be present to run IronPython apps - even if they're compiled. And IronPython will need to be next to the app unless IronPython has been installed into the GAC (which we do not do

Re: [IronPython] Problem with Creating Executable using SharpDevelop

2009-07-10 Thread Dino Viehland
Jeff wrote: How would this affect partially-trusted applications? IIRC any assemblies they reference must have APTCA. This is quite important for web applications as they are often hosted in medium trust. Good point. If we confirm that APTCA, SecurityTransparent and GAC all mix perfectly

Re: [IronPython] Problem with Creating Executable using SharpDevelop

2009-07-10 Thread Dino Viehland
Jeff wrote: For the sake of simplifying the NWSGI usage instructions (or: think of the children!), please reconsider :). Ok, we don't seem to have a issue on CodePlex for this so I've created one: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23450 Feel free to vote on it -

Re: [IronPython] Problem with Creating Executable using SharpDevelop

2009-07-10 Thread Dino Viehland
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Friday, July 10, 2009 9:45 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with Creating Executable using SharpDevelop The big problem w/ installing into the GAC from our perspective is that assemblies

Re: [IronPython] FePy status update

2009-07-15 Thread Dino Viehland
We recently made the call that Microsoft.Dynamic's API surface would ship in .NET 4 as all internal API surface. It's still open source so anyone can pick it up and include it in their own languages to get COM support but C# needs it in the box somewhere so they can provide COM support as

Re: [IronPython] sys.builtin_module_names and embedding

2009-07-15 Thread Dino Viehland
IronPython.Modules.dll is probably not being copied for your host application. It should be next to IronPython.dll. If it's not available then we'll just continue to run w/o the modules available. From: users-boun...@lists.ironpython.com

Re: [IronPython] Issue 22239 closed as 'by design'

2009-07-17 Thread Dino Viehland
Michael wrote: Curt Hagenlocher wrote: I believe this was fixed for 2.6, but that the fix is too disruptive to backport (by a long shot!) Ah - so it is just the backport that is closed. Fair enough. Sorry for the noise. Actually the title is just wrong - this was fixed in 2.0.2 (it's a

Re: [IronPython] How to set __name__ for scriptengine instance?

2009-07-17 Thread Dino Viehland
Michael wrote: Jesse Wiles wrote: Hi, I looked in the archives a bit but nothing jumped out. I'm trying to figure out how to set the __name__ for an embedded engine instance. Here's what I'm working with... __name__ should be set per scope. How about:

Re: [IronPython] Trying to set field to bool, get TypeError: Argument cannot be null.

2009-07-18 Thread Dino Viehland
I think you need an instance of Settings - e.g. Settings().ALWAYS_DECODE_OBJECTS. That being said the exception you're getting is a bug - it should be telling you that you need an instance. I've created bug 23545: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23545

Re: [IronPython] IronPython+Gtk#+.NET?

2009-07-18 Thread Dino Viehland
From the stack trace this looks like it's Gtk# not interacting well w/ dynamic defined subclasses on .NET. My guess here is it's because IronPython defines a subclass of Gtk.Window which lives in an AssemblyBuilder instance. This is an in-memory only assembly and therefore .NET throws

Re: [IronPython] object lifecycle issues

2009-07-20 Thread Dino Viehland
#1's definitely our bug. We're caching the lookup of __init__ from Real and invoking that instead of doing the lookup each time. It should be easy enough to fix. I've opened a bug (23555 - http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23555) #2 I'd guess could be either that for

Re: [IronPython] object lifecycle issues

2009-07-20 Thread Dino Viehland
Could this be issue 2? class Real(object): def __new__(cls, *args, **kwargs): print 'real new' return object.__new__(Stub) #def __del__(self): pass # uncomment me and this works as expected class Stub(Real): def __del__(self): print I've been finalized f

Re: [IronPython] object lifecycle issues

2009-07-21 Thread Dino Viehland
...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of William Reade Sent: Tuesday, July 21, 2009 9:20 AM To: Discussion of IronPython Subject: Re: [IronPython] object lifecycle issues Dino Viehland wrote: #2 I'd guess could be either that for some reason we're failing to detect

Re: [IronPython] object lifecycle issues

2009-07-22 Thread Dino Viehland
bug ;-). Incidentally, congratulations on 2.0.2! Dino Viehland wrote: The first 2 things that occur to me is that either there's an exception happening when we run WeakRefTracker's finalizer (it swallows exceptions) or the object simply isn't being collected. But it definitely sounds

Re: [IronPython] IP B2 Issue

2009-07-23 Thread Dino Viehland
This looks like it's due to a bug fix and is correct behavior - we used to allow None + abc but we've fixed the issue and it now throws an exception as expected. Note CallTarget0 is no longer used by IronPython at all. We keep it around though for backwards compatibility because people seem to

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-07-23 Thread Dino Viehland
The core feature (__clrtype__ on type which can be used w/ meta-classes) which enables them is present - but at this point it's all about making hard things possible, not making them easy. The interesting parts still need to be built still - but they're all Python code. Harry has some samples

Re: [IronPython] how to use Predicates in IPy?

2009-07-24 Thread Dino Viehland
You can just do: x.FindAll(lambda inst:True) or: def MyPredicate(obj): return True x.FindAll(MyPredicate) -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Count László de Almásy Sent: Friday, July 24,

Re: [IronPython] how to use Predicates in IPy?

2009-07-24 Thread Dino Viehland
Is this actually a ListT or something that just happens to have a similar FindAll method? It looks like ListT only has a single overload so it works there. In this case you can do: Predicate[UInt32](lambda x: True) Or Predicate[Primitive](lambda x: True) To construct the delegate explicitly

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-07-24 Thread Dino Viehland
I'll take a look and see what we can do. I think we've largely been ignoring it because we don't directly own our own COM support (it comes from the DLR) but maybe there's something we can do here. On the tests we do generally include only passing tests. Sometimes we will add failing tests

Re: [IronPython] sympy on IP 2.6B2

2009-07-24 Thread Dino Viehland
-X:FullFrames promotes all local variables into the heap. So you can always crawl the stack and look/change them for all methods. -X:Frames only creates the frame objects and if something happens to make us promote local variables (e.g. a closure, or a call to locals(), exec, eval, dir(),

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-07-24 Thread Dino Viehland
YMMV on Mono - their 64-bit could have different performance characteristics than our 64-bit JIT. On Windows it's a big win because the 32-bit JIT is much, much faster than the 64-bit JIT. Also does Mono have something like ngen? If so you should definitely use it and you'll get much improved

Re: [IronPython] Getting function argument names from hosting

2009-07-24 Thread Dino Viehland
ObjectOperations.GetCallSignatures: import clr clr.AddReference('IronPython') from IronPython.Hosting import Python x = Python.CreateEngine() def f(a, b, c): pass x.Operations.GetCallSignatures(f) prints: Array[str](('f(a, b, c)')) -Original Message- From:

Re: [IronPython] Getting function argument names from hosting

2009-07-26 Thread Dino Viehland
Yeah, that thought occurred to me about 5 minutes after I sent it out :) This API was really intended for displaying intellisense style help but even there you probably want to have individual arg info so you can display different help as you go from param to param. We should look at coming up

Re: [IronPython] help in IronPython 2.6

2009-07-26 Thread Dino Viehland
We could patch our site.py and if worse comes to worse we may just do that. But we've never re-distributed a modified version of the std lib and we're not really wanting to start doing that. Rather we're trying to work through things on our side to make the changes and submit them back to the

Re: [IronPython] sympy on IP 2.6B2

2009-07-26 Thread Dino Viehland
Michael wrote: An undefined name is an undefined name. Sympy must be doing some magic somewhere to inject the name into the namespace. If I had to guess that magic could be something involving imports. There's another import bug Harry wants me to look at before 2.6 is done so I'll try and see

Re: [IronPython] help in IronPython 2.6

2009-07-27 Thread Dino Viehland
: Dino Viehland wrote: Michael wrote: Well I can submit a patch to site.py in Python 2.6 myself - although it probably won't be in a *released* version of Python by the time you RC. Is that helpful or not? Yep, that'd be very helpful. I have a check-in ready to go Monday which

Re: [IronPython] pdb with IronPython 2.6 beta 2

2009-07-27 Thread Dino Viehland
This is what we've tested so far :) import pdb def f(): ... print 'hi' ... print 'goodbye' ... pdb.runcall(f) stdin(2)f() (Pdb) s hi stdin(3)f() (Pdb) s goodbye --Return-- stdin(3)f()-None (Pdb) s pdb.runcall(f) stdin(2)f() (Pdb) ? Unfortunately there don't seem to be pdb tests

Re: [IronPython] object lifecycle issues

2009-07-27 Thread Dino Viehland
); // ... } BTW: As it happens, the stub class is now a sibling of the real class rather than a subclass, because it feels cleaner. Regardless, the behaviour is identical in each case. Cheers william Dino Viehland wrote: Could

Re: [IronPython] IronPython ctypes on Linux

2009-07-27 Thread Dino Viehland
Is there one library name to rule them all on Linux, Mac OS/X, FreeBSD, etc? (either common on all the OSes or something coming from a Mono mapping?) -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Slide Sent:

Re: [IronPython] sympy on IP 2.6B2

2009-07-27 Thread Dino Viehland
Jeffrey wrote: 1. Performance The bulk of this problem comes from basic.py line 804 where a closure function is called w/ keyword argument. Passing the argument as a positional argument causes us to be 6-7x slower instead of 50x. This is probably a small perf gain on CPython as well so it's

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-08-03 Thread Dino Viehland
Ok, I've finally got SQL server setup in a reasonable state where I can try and repro this. This is what I'm trying to do. I have a database called mydatabase which contains a table Table_1 which contains 1 column of type binary(4). I then attempt to do: import System conn =

Re: [IronPython] IronPython ctypes on Linux

2009-08-03 Thread Dino Viehland
Any thoughts on this? I can trivial add a DllImport to dlopen but I need to know where it's declared :) -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, July 27, 2009 3:36 PM

Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Dino Viehland
IronPython doesn't actually support INotifyPropertyChanged - it only supports custom type descriptor so that WPF can get at the values but it doesn't get the change notifications. You could make an instance of ExpandoObject which does support it: import clr

Re: [IronPython] -X:EnableProfiler and DLR hosting API (2.6b2)

2009-08-06 Thread Dino Viehland
*To:* users@lists.ironpython.com *Subject:* [IronPython] -X:EnableProfiler and DLR hosting API (2.6b2) Hi all and many thanks to Dino Viehland for answering my previous question re: sys.builtin_module_names and embedding. I am trying to use the IronPython profiler (http://blogs.msdn.com/curth

Re: [IronPython] -X:EnableProfiler and DLR hosting API (2.6b2)

2009-08-06 Thread Dino Viehland
] -X:EnableProfiler and DLR hosting API (2.6b2) Dino Viehland wrote: All the options should be the same as the command line options. So they're documented via ipy.exe /? :) C:\compilec:\Program Files\IronPython 2.6\ipy.exe /? File /? does not exist. -Original Message- From: users

Re: [IronPython] Accessing scope variables

2009-08-06 Thread Dino Viehland
The only way I can think of doing this today would be to use our Parser And PythonWalker classes to parse the func def and then walk it and look for NameExpressions. You'd also need to look for GlobalStatement's, AssignmentStatement, and AugmentedAssignmentStatement to know if it was a global or

Re: [IronPython] UTF-8 script every 1024 bytes are broken

2009-08-07 Thread Dino Viehland
I believe this is the same as bug #18637 http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=18637 This has been fixed in 2.6 already but thanks for reporting it. Unfortunately we don't current accept contributions back to IronPython. -Original Message- From:

Re: [IronPython] FW: Reflection.Emit from IronPython: What is theequivalent of typeof() in C# ?

2009-08-07 Thread Dino Viehland
Is this what you're trying to accomplish? from System.Reflection import * from System.Reflection.Emit import * import System import clr clr.AddReference('System.Core') dm = DynamicMethod(test, clr.GetClrType(System.Array[str]), System.Type.EmptyTypes) ilgen = dm.GetILGenerator()

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-08-10 Thread Dino Viehland
in IPy 2.6 has broken a needed (if ugly looking) feature in adodbapi. I will file a bug in codeplex as soon as I can isolate a good example. -- Vernon On Mon, Aug 3, 2009 at 5:33 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Ok, I've finally got SQL server setup

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-10 Thread Dino Viehland
FYI the fix is checked in and available on CodePlex as of last Friday. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Harry Pierson Sent: Monday, August 10, 2009 4:57 PM To: Discussion of IronPython Subject: Re:

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-10 Thread Dino Viehland
, 2009 5:03 PM To: Discussion of IronPython Cc: Discussion of IronPython Subject: Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text Any idea if docutils works? Michael -- http://www.ironpythoninaction.com On 11 Aug 2009, at 00:59, Dino Viehland di

Re: [IronPython] UTF-8 script every 1024 bytes are broken

2009-08-10 Thread Dino Viehland
KATO Kanryu wrote: Yes, many people are looking forward to the release of 2.6, but it seems that the development gets behind a bit the plan. I think that the 2.0 will release 1 or 2 times more. I actually believe we've been tracking pretty close to the posted plan:

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-10 Thread Dino Viehland
Michael wrote: If I use the unicodedata module from FePy then it *seems* to work. Although I do see a warning that I don't see under CPython: string:1: DeprecationWarning: object.__new__() takes no parameters Not dug in to see where it comes from. It's a new warning in 2.6 - it could be

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-11 Thread Dino Viehland
Michael wrote: Nope, no class definitions - it just uses .NET functionality. It's a very short bit of code really - 77 lines of which 30 lines are a dictionary defining a category mapping. I looked at this closer looking at all combinations of __new__/__init__ being defined and calling the

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-08-11 Thread Dino Viehland
for the test script fiddles with os.path, but adodbapi itself makes no changes to sys.modules nor os.path. On Mon, Aug 10, 2009 at 5:29 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Does adodbapi publish something into sys.modules under the name adodbapi during import

Re: [IronPython] [ANN]: IronPython 2.6 Beta 2

2009-08-11 Thread Dino Viehland
rowcount=',count /code -- Vernon On Mon, Aug 3, 2009 at 5:33 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Ok, I've finally got SQL server setup in a reasonable state where I can try and repro this. This is what I'm trying to do. I have a database called mydatabase which

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-11 Thread Dino Viehland
and restructured text Dino Viehland wrote: Michael wrote: Nope, no class definitions - it just uses .NET functionality. It's a very short bit of code really - 77 lines of which 30 lines are a dictionary defining a category mapping. I looked at this closer looking at all

Re: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-11 Thread Dino Viehland
Michael wrote: The functions with 17 arguments that don't work... This is how you call docutils programatically. I can trigger the bug with the rst2html.py scripts but to dig into what is calling it I really want to call the APIs directly. Ahh, yes, an easy work around would be to pass one of

Re: [IronPython] help with an IPy traceback

2009-08-12 Thread Dino Viehland
It looks like this code is hosted somewhere. So who is catching the exception in this case? If it's you then you can do: pythonEngine.GetServiceExceptionOperations().FormatException(exception); to get a standard Python version of the stack trace. W/o doing that the .NET stack trace is

[IronPython] IronPython 2.6 RC1 must fix bugs

2009-08-13 Thread Dino Viehland
As we're winding down towards RC1 and I wanted to do one last check to see if there's a must-fix bug that we've somehow missed. Based upon our own triage, the number of votes, etc... it's entirely possible that we've de-prioritized an important bug that might enable a new scenario, make an

<    6   7   8   9   10   11   12   13   14   15   >