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 NotSupport

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
sage- > From: users-boun...@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

Re: [IronPython] object lifecycle issues

2009-07-22 Thread Dino Viehland
; *before* I post. At least we rediscovered the __del__ 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 fin

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
gt; FindAll(Predicate[Primitive]) > > On Fri, Jul 24, 2009 at 10:15 AM, Dino Viehland > wrote: > > You can just do: > > > > x.FindAll(lambda inst:True) > > > > or: > > > > def MyPredicate(obj): > >return True > > > >

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 to

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(), vars())

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 st

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: users-boun...@lists.ironp

Re: [IronPython] Getting function argument names from hosting

2009-07-26 Thread Dino Viehland
rgument names from hosting > > Thanks, Dino! > > It'd be nice if I didn't have to parse the signature, but that'll do > for now. > > - Jeff > > On Fri, Jul 24, 2009 at 6:04 PM, Dino Viehland > wrote: > > ObjectOperations.GetCallSigna

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 std

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-26 Thread Dino Viehland
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 integrates SVN as of Tuesday or Wedn

Re: [IronPython] help in IronPython 2.6

2009-07-27 Thread Dino Viehland
on 2.6 > > Michael Foord wrote: > > 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 >

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) > (2)f() (Pdb) s hi > (3)f() (Pdb) s goodbye --Return-- > (3)f()->None (Pdb) s >>> pdb.runcall(f) > (2)f() (Pdb) ? Unfortunately there don't seem to be pdb tests so it

Re: [IronPython] object lifecycle issues

2009-07-27 Thread Dino Viehland
{ > IntPtr typePtr = CPyMarshal.ReadPtrField(ptr, > typeof(PyObject), "ob_type"); > PythonType type_ = (PythonType)this.Retrieve(typePtr); > > object[] args = new object[]{}; > if (Builtin.issubclass(type_, TypeCache.Int32)) > { >

Re: [IronPython] IronPython ctypes on Linux

2009-07-27 Thread Dino Viehland
If we just aliased LoadLibrary to dlopen will that work? My hope was that we could basically rely upon Mono's P/Invoke mapping to handle running ctypes on Linux. But maybe LoadLibrary/dlopen have slightly different sigs and we need to handle that one specially. > -Original Message- > Fro

Re: [IronPython] IronPython ctypes on Linux

2009-07-27 Thread Dino Viehland
t; > int dlclose(void *handle); > > Not quite the same as LoadLibrary. > > On Mon, Jul 27, 2009 at 3:13 PM, Dino Viehland > wrote: > > If we just aliased LoadLibrary to dlopen will that work? > > > > My hope was that we could basically rely upon Mono's P/In

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 pro

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 = System.Acti

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,

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 clr.AddReference('Microsoft.Scripting.C

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

2009-08-06 Thread Dino Viehland
*Mads > Weitling > *Sent:* Wednesday, August 05, 2009 12:54 AM > *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_m

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:\compile>"c:\Program Files\IronPython 2.6\ipy.exe" /? File /? does not exist. > ---

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 n

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: users-boun...@

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() ilgen.Emit(OpC

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

2009-08-10 Thread Dino Viehland
> From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of KATO Kanryu > Sent: Friday, August 07, 2009 6:43 PM > To: Discussion of IronPython > Subject: Re: [IronPython] UTF-8 script every 1024 bytes are broken > > 2009/8/8 Dino Viehland wrote: >

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

2009-08-10 Thread Dino Viehland
ation = adodbapi.adUseClient then the program will run, but the rowcount will return as -1, rather than 6, because the cursor is not actually changed to a local cursor. So, to make a long story short: some change in IPy 2.6 has broken a needed (if ugly looking) feature in adodbapi. I will file a bug in

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: [IronPython] FlowDocument XAML syntax highlighting and restructured text

2009-08-10 Thread Dino Viehland
y, August 10, 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

Re: [IronPython] ValueError: cannot assign to value types

2009-08-10 Thread Dino Viehland
Just out of curiosity - how would you feel if we enabled the behavior but issued a warning when it occurred? In v1.0 when we made this decision we had no warning support and it could serve as a mitigating factor in enabling it. But it could also be too noisy. It's funny, I just got had to fix a

Re: [IronPython] ValueError: cannot assign to value types

2009-08-10 Thread Dino Viehland
t allowed me to work around > the current situaiton. a warning seems fine to me. even better, an > explicit way for us to enable the behavior without a warning. > > On Mon, Aug 10, 2009 at 6:27 PM, Dino Viehland > wrote: > > Just out of curiosity - how would you feel if we enabl

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: http://ironpython.codeple

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: > > :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 that

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 s

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

2009-08-11 Thread Dino Viehland
p 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 mailto:di...@microsoft.com>> wrote: Does adodbapi publish something into sys.modules under the name adodbapi during i

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

2009-08-11 Thread Dino Viehland
ters.Item[0] p.AppendChunk(b) # this is the error line ra = System.Reference[int]() rs = cmd.Execute(ra) count = ra.Value print 'Returned rowcount=',count -- Vernon On Mon, Aug 3, 2009 at 5:33 PM, Dino Viehland mailto:di...@microsoft.com>> wrote: Ok, I've finally got SQL ser

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

2009-08-11 Thread Dino Viehland
cument XAML syntax highlighting 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 > >>

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

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.GetService().FormatException(exception); to get a standard Python version of the stack trace. W/o doing that the .NET stack trace is basically useless. Sometim

[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 exis

Re: [IronPython] Using IronPython as an assembly in dotNET

2009-08-13 Thread Dino Viehland
What language are you doing this from? ScriptEngine.Execute has an overload which is generic and an overload which is not generic. The generic version will get the result and convert it to the provided generic type. It looks like for some reason you end up trying to call the generic version here

Re: [IronPython] Using IronPython as an assembly in dotNET

2009-08-13 Thread Dino Viehland
ython and MAXScript (native 3ds > Max scripting language). > > I have no idea how to access the generic/non-generic engine, further > more, I have no idea what the difference is. > > As for scope, I can do that, the problem is, I have no idea how exactly > to do that. Is there a

Re: [IronPython] InvokeMember with three or more parameters.

2009-08-17 Thread Dino Viehland
We haven't implemented support for more than 3 parameters :) In 2.6 I just fixed > 3 params for the Invoke case (not InvokeMember) and I can fix > 3 for InvokeMember/CreateInstance as well before 2.6 ships. The preferred way to do this though is to do a GetMember where T is a delegate type with >

Re: [IronPython] Controling DLR/IronPython Memory Size

2009-08-17 Thread Dino Viehland
What version of IronPython are you using? Have you ngen'd the binaries? Ngen will significantly reduce the amount of private working set IronPython uses. I assume you don't have a "site.py" or the standard library present or I think it'd probably be more. On my machine (some post-RC1 Windows 7 b

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

2009-08-17 Thread Dino Viehland
line ra = System.Reference[int]() rs = cmd.Execute(ra) count = ra.Value print 'Returned rowcount=',count -- Vernon On Mon, Aug 3, 2009 at 5:33 PM, Dino Viehland mailto:di...@microsoft.com>> wrote: Ok, I've finally got SQL server setup in a reasonable state where I can try and

Re: [IronPython] How do you run compiled scripts(dll) by C# host?

2009-08-17 Thread Dino Viehland
What Curt says is true but I would suggest doing scriptRuntime.LoadAssembly instead. Once you do that you can do engine.ImportModule (an extension method defined in the Python class) do get a ScriptSource for any of your compiled modules. InitializeModule may change from major version to major

Re: [IronPython] IronPython 2.6 Bugs

2009-08-18 Thread Dino Viehland
That's convenient because I've been working on fixing that one along w/ another related bug for getting PyDev debugging to work. This one will require that you provide a -X:Tracing command line flag so that we always have the tracing code gen. But it works on my machine as of a couple of days ago

Re: [IronPython] Pyc in IronPython 2.6

2009-08-18 Thread Dino Viehland
Compile on 64-bit? :) I have a guess of what the problem is here but I haven't run a test to Confirm. I recently ran into a similar issue when I increased the number of constants we were generating - except for I was just trying to pre-compile a single file. If you want to build from source you

Re: [IronPython] InvokeMember with three or more parameters.

2009-08-19 Thread Dino Viehland
: [IronPython] InvokeMember with three or more parameters. Hello. Thank you for answer. How can I create script object without code generation same like: scriptEngine.Execute(string.Format("{0}()","Broker"),scriptScope); ? Dino Viehland wrote: > We haven't imple

Re: [IronPython] FolderBrowserDialog does not show folders

2009-08-19 Thread Dino Viehland
Are you compiling w/ the "/target:winexe" option? You'll need to provide that for doing WinForms development. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of David Escobar Sent: Wednesday, August 19, 2009 11:03 AM To: Discussion of IronPython Su

Re: [IronPython] sys.argv empty in compiled scripts

2009-08-19 Thread Dino Viehland
It is fixed in 2.6. I don't see another bug on this anywhere else so the new bug will be good to keep around for 2.0.3. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Wednesday, August 19, 2009 3:44

Re: [IronPython] FolderBrowserDialog does not show folders

2009-08-19 Thread Dino Viehland
thon 2.0.2\ipy.exe" pyc.py > /out:FolderBrowserDialogTest > /main:FolderBrowserDialogTest.py /target:winexe > FolderBrowserDialogTest.py*. > > The dialog window does come up with every control except > the tree view

Re: [IronPython] How to get stack traces from runtime exception with using generators.

2009-08-20 Thread Dino Viehland
Is there a reason you can't just call FormatException for both cases? Depending on how the exception is propagated there may be more data in the exception Data property which we need to pick out and format to accurately display it. -Original Message- From: users-boun...@lists.ironpytho

Re: [IronPython] Performances and Profiling of ReportLab under IronPython

2009-08-20 Thread Dino Viehland
IronPython import time remains much slower than CPython. I think you've seen from the differences between 2.0 and 2.6 that we've already made significant progress in improving this - and we certainly plan to continue pushing on it with each release. One way to improve startup time today is to

Re: [IronPython] How to get stack traces from runtime exception with using generators.

2009-08-21 Thread Dino Viehland
Kanryu > Sent: Thursday, August 20, 2009 8:09 PM > To: Discussion of IronPython > Subject: Re: [IronPython] How to get stack traces from runtime > exception with using generators. > > 2009/8/21 Dino Viehland : > > Is there a reason you can't just call FormatExceptio

Re: [IronPython] Spurious warning when executing modules with -m

2009-08-21 Thread Dino Viehland
runpy is setting __package__ to an empty string. Looks like CPython doesn't warn when the string is empty because if I do: import runpy x = runpy.run_module('foo', run_name = '__main__', alter_sys=True) CPython doesn't warn. So the fix is easy enough. But it's interesting CPython no longer call

Re: [IronPython] Constructors & inheriting from standard .NET classes

2009-08-21 Thread Dino Viehland
You need to override and call the base __new__ instead of __init__. .NET has a simpler construction model than Python does and __new__ is what best corresponds to .NET constructors. class Derived(Test.Base): def __new__(cls, i): return Test.Base.__new__(cls, i) d = Derived() From

Re: [IronPython] Constructors & inheriting from standard .NET classes

2009-08-21 Thread Dino Viehland
ubject: Re: [IronPython] Constructors & inheriting from standard .NET > classes > > Dino Viehland wrote: > > You need to override and call the base __new__ instead of __init__. > .NET has a simpler construction model than Python does and __new__ is > what best corresponds to .N

Re: [IronPython] Call methods from Python-Script

2009-08-26 Thread Dino Viehland
Is CClassName a public type? It'll need to both have public members and also be public its self. If that's not the problem I'm having trouble understanding exactly what's going on. Is "return class.doSomething(parameter)" supposedly Python code? Or are you doing this from C#? "class" is a k

Re: [IronPython] IPy 2.x and ASP.NET 3.5

2009-08-27 Thread Dino Viehland
To get around the signing issues you can run "sn -Vr Microsoft.Scripting.ExtensionAttribute.dll" on your built version if you build it w/ our public key. The public key is in our source distributions as "MSSharedLibKey.snk". I had intended for 2.6 to be lined up w/ the previously shipped extens

Re: [IronPython] IPy 2.x and ASP.NET 3.5

2009-08-27 Thread Dino Viehland
I've generated the 0.9 and 2.0 versions for 2.0 and 2.6 and attached them: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=19126 > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Dino V

Re: [IronPython] Generating executables out of IronPython script

2009-08-28 Thread Dino Viehland
You might be able to use al.exe to link them together - but otherwise no. Is the problem having both Main.dll + Main.exe (which we could presumably fix)? Or is it just the large number of assemblies overall? From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com]

Re: [IronPython] Users Digest, Vol 61, Issue 57

2009-08-29 Thread Dino Viehland
When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: 1. Generating executables out of IronPython script (Prabhu Mohan) 2. Re: Generati

Re: [IronPython] CallTargetX delegates

2009-09-01 Thread Dino Viehland
Yes. CallTarget's were really a part of IronPython's internal calling convention for used defined functions. We kept CallTarget0 around because we knew lots of users had come to depend on that one when they needed a delegate type. But we removed all the others and switched to using Func<...>

Re: [IronPython] Template library

2009-09-02 Thread Dino Viehland
Michael Foord wrote: > I can report this issue to the django guys. I'm still interested in > making sure that the other problems you reported are entered as > codeplex > issues if necessary (please). Jeff Hardy might also already have a fix for this issue over at: http://bitbucket.org/jdhardy/dja

Re: [IronPython] Template library

2009-09-02 Thread Dino Viehland
Zach Crowell wrote: > Here's a simple repro of the Evoque re issue. Unfortunately, the error > doesn't give any indication on what regex caused the failure, and I > can't really take a look. > > D:\>ipy > IronPython 2.6 Beta 2 (2.6.0.20) on .NET 2.0.50727.3053 > Type "help", "copyright", "credits

Re: [IronPython] Using PYC in IP 2.6

2009-09-03 Thread Dino Viehland
dippim wrote: > The compile works fine and I can execute the resulting test.exe fine > UNLESS I remove the original test.py file from the directory the > test.exe file is being executed from. If I remove the test.py file, > the program crashes. If I put it back, then everything is fine > again. >

Re: [IronPython] Probing for Modules

2009-09-07 Thread Dino Viehland
In Python speak it's importing. Python has very rich import semantics and has multiple ways of being hooked. Here's some info on that http://wikikk.com/doc/2.3/whatsnew/section-pep302.html. That'll leave all the normal file system access there (for things like the standard library) and still

Re: [IronPython] Error message for duplicate keyword arguments

2009-09-08 Thread Dino Viehland
Filed as 24576 (http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=24576) I don't know that it'll get fixed for 2.6 (although I will take a look). But I think keyword arg calling needs some general work post-2.6 so that polymorphic and megamorphic cases work faster and this fix could

Re: [IronPython] Error message for duplicate keyword arguments

2009-09-08 Thread Dino Viehland
Michael wrote: > It's a nuisance for the Python Tutorial, which gives an example of what > happens when you call a function incorrectly and the error message from > IronPython is both different and confusing. :-) The good news then is that it does look easy to fix :)

Re: [IronPython] How to integrate IronPython 2.6 to C# program?

2009-09-09 Thread Dino Viehland
Can you include a little more information? Such as the stack trace of the exception and what the code is doing when it happens? > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of KATO Kanryu > Sent: Wednesday, Septem

Re: [IronPython] How to integrate IronPython 2.6 to C# program?

2009-09-09 Thread Dino Viehland
Is it working now for you w/ the Frames = true in the options then? For the RC we have a fixed versions of the std lib (thanks to Michael Foord for fixing it upstream) and we're going to give a specific error message when _getframe is accessed from sys but the frames option isn't enabled. > -

Re: [IronPython] CallTargetX delegates

2009-09-14 Thread Dino Viehland
; Ok cool. I've used Func<> from C# before. That did the trick. Thanks. > > > On Tue, Sep 1, 2009 at 6:19 PM, Dino Viehland > mailto:di...@microsoft.com>> wrote: >> >> Yes. CallTarget's were really a part of IronPython's internal calling >> conve

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2009-09-16 Thread Dino Viehland
This looks like final tweaks for the 2.6 release. Other ones have just been missing "codeplexcomment" in the rush to get the final 2.6 changes in. In general the changes over the past few weeks have been: A handful of final bug fixes Moving a large amount of Microsoft.Scripting.d

Re: [IronPython] Many small objects and memory footprint

2009-09-17 Thread Dino Viehland
One option is to define __slots__ on your classes and not include __dict__ in the list of slots. This will limit the attributes you can store on the object and the objects will all be stored in an array instead of a dictionary. __slots__ should include each attribute you want to be able to set

Re: [IronPython] Having Issues With KeyUp Event

2009-09-18 Thread Dino Viehland
You're probably missing a reference to System.Windows.Input, doing: clr.AddReference('System.Windows.Input') will probably make it work. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Nick Hird Sent: Friday, September

Re: [IronPython] How to get ToString() working, and questions about GetSysModule() and GetClrModule()

2009-09-21 Thread Dino Viehland
Because this is on a per-module basis calling GetClrModule() won't affect the module you later want to do .ToString from. I think the easiest way to do this would be to do: var code = Engine.CreateScriptSourceFromString("import clr", SourceCodeKind.Statements).Compile(); and whenever you want

Re: [IronPython] How to get ToString() working, and questions about GetSysModule() and GetClrModule()

2009-09-21 Thread Dino Viehland
sult); } I'm not convinced if it's working because I'm unsure what GetClrModule() precisely does or how many scopes there can be, or if there's really only one scope and everything is additive, or... Dino Viehland wrote: > Because this is on a per-module basis call

Re: [IronPython] what does MethodImplOptions.NoOptimization do?

2009-09-23 Thread Dino Viehland
It’s going to disable JIT optimizations on the individual method. This was added because we were seeing some differences between release builds and debug builds around floating point math. We need to track down the real issue but it may just be a CLR bug that doesn’t affect Mono (or maybe it’

Re: [IronPython] IronPython 2.6rc1 / PyDev: Breakpoint No Workie?

2009-09-24 Thread Dino Viehland
I pinged Fabio off the list to see if he thought this combination should work. He says he'll take a look at it over the weekend. If it's something on our side I think we'd fix it in the final release or put out a new RC. > -Original Message- > From: users-boun...@lists.ironpython.com [ma

Re: [IronPython] Creating a CodeContext in 2.6RC

2009-09-27 Thread Dino Viehland
> There's a couple of places in NWSGI where I need a CodeContext, so > I've just been creating an empty one like so and using it (and it's > worked so far): > new CodeContext(new Scope(), > HostingHelpers.GetLanguageContext(engine)) > > Now, in 2.6 RC I need a PythonDictionary instead of a sco

Re: [IronPython] IronPython 2.6 version numbers

2009-09-27 Thread Dino Viehland
> Hi IronPython team, > I don't know if this is even an issue, but I'd like to make a request > for the IronPython 2.6.x releases - please do not change the > AssemblyVersion from 2.6.0, or make any ABI breaking changes. I'll > admit, this is mostly because of my own laziness; I don't want to have

Re: [IronPython] Creating a CodeContext in 2.6RC

2009-09-27 Thread Dino Viehland
Michael wrote: > I've had to use these several times and they are also used in Ironclad. > Documentation, *especially* of the changes, would be very useful. We're going to spend some time in the next couple months on writing and packaging up some useful documentation. This is definitely one are

Re: [IronPython] MonoTouch support

2009-09-27 Thread Dino Viehland
Dave wrote: > Hi, I'm wondering what it would take in theory to get IronPython > working on MonoTouch (http://monotouch.net/) - the framework for > writing iPhone apps in C#. > > By that I mean that I'm trying to understand the technical obstacles > that would need to be overcome and possible ways

Re: [IronPython] clr.CompileSubclassTypes

2009-09-28 Thread Dino Viehland
You should see performance benefits especially if there's a large number of types subclassed during startup. I'd also recommend ngen'ing the resulting assembly. Also clr.GetSubclassedTypes() will return you a list of types which you have subclassed so far. It's designed to round trip w/ Compile

Re: [IronPython] IronPython/NWSGI 0-byte 200/404 response with HelloWorld?

2009-09-28 Thread Dino Viehland
> I looked at it yesterday, and 'impossible' would be a better way to > describe it. Some types have moved between assemblies (from > Microsoft.Scripting to Microsoft.Dynamic) and so simply changing the > assembly bindings won't work. There were also some API changes that I > need to fix before NWS

Re: [IronPython] New articles: Introduction to IronPython, Python for .NET Programmers and Dark Corners of IronPython

2009-10-01 Thread Dino Viehland
VB, and the CLR in general, has supported named parameters since .NET 1.0. It's just C# that's finally getting support in .NET 4.0. Otherwise I think the Dark Corners looks great! -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com]

Re: [IronPython] IronPython 2.6rc1 / PyDev: Breakpoint No Workie?

2009-10-02 Thread Dino Viehland
Yep, sorry for not responding back earlier. Fabio took a look and basic debugging worked for him. But there were some problems w/ multiple threads still. Fabio reported this previously and while I thought I had fixed it there were still some intermittent failures. I've got a new fix checked int

Re: [IronPython] Error on startup of IronPython 2.6 RC with certain command line options

2009-10-05 Thread Dino Viehland
I actually ran into this last night and have a fix for it which will be in RC2. > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of Michael Foord > Sent: Monday, October 05, 2009 4:58 AM > To: Discussion of IronPython

Re: [IronPython] IronPython 3

2009-10-05 Thread Dino Viehland
Michael wrote: > I'd love to see IronPython 3 as a separate DLR language that could be > used alongside IronPython 2.X. That way an IronPython 2 engine could use > IronPython 3 engines and vice versa. This would allow Python 3 apps to > use Python 2 libraries (with a wrapper layer) and vice-versa,

Re: [IronPython] Thread local storage in IronPython 2.6

2009-10-05 Thread Dino Viehland
Michael wrote: > We're working on the port of Resolver One to IronPython 2.6. We're > finding that in quite a few of our tests our documents are now not being > garbage collected, which would be a major memory leak in Resolver One if > left unaddressed. > > As far as we can *tell* what is keeping

Re: [IronPython] IronPython 3

2009-10-05 Thread Dino Viehland
Michael wrote: > Can one process load different versions of the same assembly? I thought > that wasn't possible. Yep! Effectively everyone's favorite "Cannot cast A to A" exception is a variation on doing this :) ___ Users mailing list Users@lists.iro

Re: [IronPython] Thread local storage in IronPython 2.6

2009-10-05 Thread Dino Viehland
> *However*, we discovered that we inadvertently had options["Frames"] = > true; in the code that creates the main engine. Switching that off (and > then having to recompile all our Python code) solved the problem. > > It may indicate that if we want to turn frames on in individual engines > (each

Re: [IronPython] Thread local storage in IronPython 2.6

2009-10-05 Thread Dino Viehland
Michael wrote: > The recompiling issue is slightly concerning as well. Is it the case > that if we compile all our libraries with Pyc with frames off then we > can't use them from an engine with the tracing / frames / debugging > options on (taking advantage of frames and debugging support)? Unfo

<    4   5   6   7   8   9   10   11   12   13   >