[IronPython] Announcement: Ironclad v0.1

2008-02-22 Thread William Reade
d patches and test cases will receive the maximum possible brownie points ;-). Cheers William -- William Reade Resolver Systems [EMAIL PROTECTED] We're hiring! http://www.resolversystems.com/jobs/ Office address: 17a Clerkenwell Road, London EC1M 5RD, UK Registered address: 843 Finch

[IronPython] file.mode property doesn't exist

2008-03-06 Thread William Reade
Hi IronPython 1.1.1 (1.1.1) on .NET 2.0.50727.312 Copyright (c) Microsoft Corporation. All rights reserved. >>> f = open("text.txt") >>> f.mode Traceback (most recent call last): File , line 0, in ##82 AttributeError: 'file' objec

[IronPython] Ironclad v0.2 released

2008-04-23 Thread William Reade
Hi all Please enjoy Ironclad v0.2, which is now available from: http://code.google.com/p/ironclad/downloads/list Major changes are as follows: * Ironclad now uses IronPython 2.0b1 for everything. * It is now possible to use all the functions and types -- and their methods -- from the bz2 modul

[IronPython] Ironclad v0.5 released

2008-08-21 Thread William Reade
(Cross-posted from the c-extensions-for-ironpython google group -- I thought a few people here might be interested too :)) Hi all Our original goal for 0.5 was to import numpy, from IronPython, and do something with it. With one monstrous caveat, we have reached that goal; the problem is that

[IronPython] blocker: objects deleted when they shouldn't be

2008-09-29 Thread William Reade
Hi all I'm about to file this on Codeplex, but I think I've tracked down a subtle and nasty bug, which is blocking Ironclad with numpy (it fatally breaks matrices and masked arrays), and I feel compelled to shout loudly about it to ensure it doesn't get lost in the noise of the impending 2.0

Re: [IronPython] blocker: objects deleted when they shouldn't be

2008-09-29 Thread William Reade
TECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Monday, September 29, 2008 7:11 AM To: users@lists.ironpython.com Subject: [IronPython] blocker: objects deleted when they shouldn't be Hi all I'm about to file this on Codeplex, but I think I've tracked down a subtle an

Re: [IronPython] blocker: objects deleted when they shouldn't be

2008-09-30 Thread William Reade
EMAIL PROTECTED] On Behalf Of William Reade Sent: Monday, September 29, 2008 10:50 AM To: Discussion of IronPython Subject: Re: [IronPython] blocker: objects deleted when they shouldn't be Thanks Dino :) Can you suggest an approximate ETA for a fix? I don't want to hassle you, but I'm ve

[IronPython] Ironclad problem, with which someone here may be able to help

2008-11-05 Thread William Reade
Hi all While running the numpy tests, I've come across a situation which, to the best of my knowledge, is simply impossible. I'm hoping that one of the local .NET gurus will be able to tell me what I'm missing, or point me somewhere I can get more insight. The 4 methods involved are as follo

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-05 Thread William Reade
Incidentally, logging a Stopwatch timestamp in WriteFlush reveals that, yes, the calls really are happening in the order they appear to be. So, option (3) appears to be a red herring, and options (1) and (2) remain unchanged. William Reade wrote: Hi all While running the numpy tests, I&#x

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-05 Thread William Reade
Curt Hagenlocher <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: So, the obvious question for me is whether or not you're using any finalizers. On Wed, Nov 5, 2008 at 5:57 AM, William Reade <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-05 Thread William Reade
al AppDomains in the process? On Wed, Nov 5, 2008 at 10:15 AM, William Reade <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi Curt I am indeed; that's how I know thread 2 is the GC thread. Is locking during GC forbidden? William Curt Hagenlocher wr

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-06 Thread William Reade
's a hardware bug as unlikely as that seems? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Wednesday, November 05, 2008 10:01 AM To: Discussion of IronPython Subject: Re: [IronPython] Ironclad problem, with which someone here may be able t

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-06 Thread William Reade
Finalization still happens on thread 2, and I see no evidence of thread 1 any more; my main thread now appears to have id 3. Curt Hagenlocher wrote: When you run with -X:MTA, is the object now being finalized on a thread other than thread #2? On Thu, Nov 6, 2008 at 7:01 AM, William Reade

[IronPython] trivial long() bug

2008-11-06 Thread William Reade
CPy: >>> long('') Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for long() with base 10: '' IPy: >>> long('') 0L ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-iron

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-07 Thread William Reade
#x27;ll let you know when I hear back. -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Thursday, November 06, 2008 7:29 AM To: Discussion of IronPython Subject: Re: [IronPython] Ironclad problem, with which someone here may be able to hel

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-07 Thread William Reade
does appear to load ole32, but I haven't worked out what, if anything, it's doing with it. * I had to work with faked-up COM interfaces while working on mac game ports a few years ago -- that's the full extent of my experience. William Reade wrote: I'll look into t

Re: [IronPython] Ironclad problem, with which someone here may be able to help

2008-11-07 Thread William Reade
I'll look into that along with everything else :). Dino Viehland wrote: Do you know if numpy is using COM anywhere? Or does Ironclad use COM for any of its interop? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Thu

[IronPython] (ironclad) is it possible to get the current ScriptEngine?

2008-11-20 Thread William Reade
Hi all At the moment, when a user types 'import ironclad', I create a new ScriptEngine and set that up to allow .pyd imports; I then abuse path_hooks to use the new engine to do the imports, and copy them into the original engine's sys.modules. Clearly, this is evil and wrong on any number of

Re: [IronPython] (ironclad) is it possible to get the current ScriptEngine?

2008-11-20 Thread William Reade
alling at some point. For example our ModuleLoader class for pre-compiled code has a load_module method which receives a CodeContext. It then uses it to call back into the current PythonContext and create a new module. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [IronPython] (ironclad) is it possible to get the current ScriptEngine?

2008-11-20 Thread William Reade
cope) or a ScriptSource (engine.CreateScriptSourceFromString) -- even if I just dupe IronPython code, it seems I'll still need an actual PythonEngine to construct them. Am I missing something obvious? William Reade wrote: Thanks Dino -- I'll see what I can do with that :) Dino Vieh

Re: [IronPython] (ironclad) is it possible to get the current ScriptEngine?

2008-11-21 Thread William Reade
use SourceUnit. You might find there's too much stuff marked internal w/ SourceUnit so any issues you run into here would be interesting to hear. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade Sent: Thursday, November 20, 2008 9:50

[IronPython] Ironclad v0.7 released

2008-11-27 Thread William Reade
Hi all I'm delighted to announce the release of Ironclad v0.7, which is now available from http://code.google.com/p/ironclad/downloads/list . This release is a major step forward: * Runs transparently on vanilla IronPython 2.0RC2, without creating extra PythonEngines or breaking .NET namespa

Re: [IronPython] IronPython and file descriptors

2008-12-17 Thread William Reade
Just a quick note: you can't necessarily just P/invoke out to msvcrt, because CPython was built with msvcr71. Sorry :(. Tom Wright wrote: I'm not sure about sockets. The only example I have found in the wild so far is with files in PIL. The python implementation seems to have socket.fileno()

[IronPython] Ironclad 0.8 released

2009-01-29 Thread William Reade
Hi all I'm delighted to announce the release of Ironclad v0.8 -- the all-singing, all-dancing CPython API compatibility layer for IronPython -- available now from http://code.google.com/p/ironclad/ . Notable improvements over the last release include: * Ironclad is now a neatly self-containe

Re: [IronPython] Ironclad 0.8 released

2009-01-29 Thread William Reade
29/01/2009, at 13:43, William Reade wrote: Hi all I'm delighted to announce the release of Ironclad v0.8 -- the all-singing, all-dancing CPython API compatibility layer for IronPython -- available now from http://code.google.com/p/ironclad/ . Notable improvements over the last

Re: [IronPython] Resolver One 1.4 beta - with IronPython 2.0

2009-02-04 Thread William Reade
I should point out ahead of time that there's no mmap module in IronPython at the moment, and so memory-mapped ndarrays don't work yet -- although most of the usual numpy save/load bits do work, so you'll probably be fine (unless they're too big to fit in memory). Dan Shechter wrote: Here! I

[IronPython] Ironclad v0.8.1 released

2009-02-18 Thread William Reade
Hi all I'm fairly pleased to announce the release of Ironclad v0.8.1; it's not an enormous technical leap above v0.8, but it does now enable you to import and use SciPy and Matplotlib with IronPython on Win32 (with some restrictions; see project page) . Downloads, and more details, are availa

Re: [IronPython] Please, help to get started with .Net and IronPython.

2009-04-23 Thread William Reade
I think he's rewriting a C++ component in IronPython, and wants to know how he can minimise the impact on the C# application which hosts it. Curt Hagenlocher wrote: It's great that you want to improve your skills. But I feel obliged to point out that IronPython -- and CPython, for that matter

Re: [IronPython] pywin32 on Iron Python?

2009-04-29 Thread William Reade
Dave Fugate wrote: That said, there is something extremely useful the community can do for IronPython that our team simply cannot: get 3rd party Python applications such as Django, pywin32, NumPy, etc running under IronPython. This could mean adapting something like adodbapi.py to utilize IronPy

[IronPython] Control event ids

2009-04-30 Thread William Reade
Hi List >>> import clr >>> clr.AddReference('System.Windows.Forms') >>> from System.Windows.Forms import TabControl >>> t = TabControl() >>> t.MouseDown == t.MouseDown False >>> t.MouseDown is t.MouseDown False >>> This behaviour makes it

Re: [IronPython] Control event ids

2009-05-01 Thread William Reade
Curt Hagenlocher wrote: iour makes it extremely cumbersome to detach from events (some events, anyway; I'm pretty certain that I've seen events which don't exhibit this behaviour, but I can't remember what they are). An example of this would be useful. Sorry for the noise -- it seems I

Re: [IronPython] .exe is not pre-compiled

2009-05-04 Thread William Reade
Generally, CPython modules have the .pyd extension -- and, in fact, Ironclad will only detect and handle attempts to import .pyd files. So, sadly, it won't help you here. It wouldn't be hard to make Ironclad handle .exe files, but the likelihood of it doing anything useful with them is minimal.

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-09 Thread William Reade
I had a similar problem in Ironclad -- needing to get the engine which called a C# method. Try adding a CodeContext parameter to GetModule (which gets automagically inserted; no need to change the call from Python), and then using PythonContext.GetContext to get a PythonContext from the CodeCon

[IronPython] mmap, csv, others

2009-05-19 Thread William Reade
Hi all Life permitting, the next version of Ironclad should have a few of the built-in C extensions included in it. I have vague plans that the first two will be mmap and _csv (because I've had to fake both of those out for numpy); however, I just wanted to check whether anybody else was doin

Re: [IronPython] mmap, csv, others

2009-05-19 Thread William Reade
les which would give us a chance to do it in the future but until then we wouldn't even think about it. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of William Reade Sent: Tuesday, May 19, 2009 2:37 AM To: Discuss

[IronPython] object lifecycle issues

2009-07-20 Thread William Reade
Hi all I have two problems that are at least somewhat related: +++ Issue 1 (probably your bug): --- C:\dev\ironclad - Copy>ipy y.py real new stub new real init real del C:\dev\ironclad - Copy>python y.py real new stub new stub init re

Re: [IronPython] object lifecycle issues

2009-07-21 Thread William Reade
ave permissions there to do that or not. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of William Reade Sent: Monday, July 20, 2009 9:38 AM To: Discussion of IronPython Subject: [IronPython] object lifecycle issu

Re: [IronPython] object lifecycle issues

2009-07-21 Thread William Reade
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 = Real(1.0) del f import sys if sys.platform == 'clr': import clr from Syste

Re: [IronPython] object lifecycle issues

2009-07-21 Thread William Reade
Dino Viehland wrote: #2 I'd guess could be either that for some reason we're failing to detect the presence of __del__ or that when we run the finalizer cleanup that we believe it's part of cyclic trash and don't think we should cleanup. Of those I'd think it'd be the cyclic trash detection that'

Re: [IronPython] object lifecycle issues

2009-07-22 Thread William Reade
n STA). -Original Message- 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&#x

Re: [IronPython] Hosted IronPython "cannot import" error

2009-09-11 Thread William Reade
Packetlogic does indeed use compiled CPython extensions, and so won't normally work with IronPython. However, it appears to import cleanly if you use Ironclad: C:\dev\ironclad-v0.8.5-src\build>ipy IronPython 2.0.2 (2.0.0.0) on .NET 2.0.50727.3074 Type "help", "copyright", "credits" or "license"

[IronPython] SystemError while compiling PIL.Image

2009-10-22 Thread William Reade
Transcript follows. The contents of the file don't look obviously weird. Does anyone have any idea what the problem might be? Cheers William - C:\dev\ironclad>ipy -X:ExceptionDetail C:\Python26\Lib\site-packages\PIL\Image

Re: [IronPython] SystemError while compiling PIL.Image

2009-10-23 Thread William Reade
rom: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of William Reade Sent: Thursday, October 22, 2009 6:37 AM To: Discussion of IronPython Subject: [IronPython] SystemError while compiling PIL.Image Transcript follows. The contents of the file don't look o

Re: [IronPython] IronPython and PIL?

2009-10-23 Thread William Reade
Hi Markus Parts of PIL should work with IronPython if you're willing to import ironclad first ( http://code.google.com/p/ironclad ). If you're still using ipy 2, the latest binary release should work for you. (If you're using 2.6, it definitely won't work right now, because ipy 2.6 can't par

[IronPython] Ironclad v2.6.0rc1 released

2009-12-23 Thread William Reade
Hi all I'm very happy to announce the latest release (candidate) of Ironclad, the 120-proof home-brewed CPython compatibility layer, now available for IronPython 2.6! No longer need .NET pythonistas toil thanklessly without the benefits of bz2, csv, numpy and scipy: with a simple 'import ironclad

Re: [IronPython] NUnit with IronPython

2005-12-08 Thread William Reade
Does this mean that IronPython will emit methods, but their names will be mangled, or that it simply won't produce anything that can be effectively used from outside? William Martin Maly wrote: >This is, sadly, true. IronPython will not preserve the name of the method as >we know it... > >Mar

Re: [IronPython] NUnit with IronPython

2005-12-08 Thread William Reade
t;work, provided that nunit executes public static methods and doesn't require >specific return value. Ours is always "object" in this case. > >Martin > > >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Reade >S

[IronPython] get_Item in subclass

2005-12-19 Thread William Reade
We've been having some problems subclassing the SyncFusion Grid control with IronPython; namely, that: class TestGridControl(GridControl): pass grid = TestGridControl() value = "foobar" grid[1, 1].CellValue = "foobar" fails with the following stack trace: Unhandled exception: Bad args for

[IronPython] Comparing enum to None

2005-12-21 Thread William Reade
Hi, we have a bug report. The following code: -- import sys sys.LoadAssemblyByName("System.Windows.Forms") from System.Windows.Forms import * if 1 == None: print "won't happen" if DialogResult.Cancel == None: # boom! print "

[IronPython] function/method comparison

2005-12-22 Thread William Reade
Hi, we have another bug report. This one's a bit longer... In IronPythonConsole (0.9.6): -- IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> class C: ... def f(self): ... pass

Re: [IronPython] Lists of instances of classes

2006-01-05 Thread William Reade
It appears that tuples have similar problems to lists (tested on 0.9.5 and 1.0b1): -- >>> class C: ... pass ... >>> c1 = C() >>> c2 = C() >>> (c1, c2) == (c2, c1) True -- Cheers William Giles Thomas wrote: >Some more discoveries, following on from the below: > >--

[IronPython] Nitpicking:

2006-02-07 Thread William Reade
"lambda" appears to be misspelled here: --- IronPython 1.0.2216 (Beta) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> lambda x : x --- Cheers William -- We're hiring! __

[IronPython] Beta 5 bug: False == None?

2006-04-04 Thread William Reade
--- IronPython 1.0.2280 (Beta) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> False == None True --- The avove comparison should evaluate to False. I

[IronPython] Adding None to a set

2006-06-29 Thread William Reade
Hi guys As if you didn't have enough on your plates already... IronPython beta8: >>> st = set([]) >>> st.add(None) >>> st set([]) CPython: >>> st = set([]) >>> st.add(None) >>> st set([None]) Cheers William ___ users mailing list users@lists.iro

[IronPython] Compilation difficulties

2006-09-29 Thread William Reade
Hi all I've been playing with the (excellent) Pyc sample, and I've got stuck. I have a series of files a bit like the following: project/ | main.py + Cheesemonger/ | Shopkeeper.py | Counter.py ...in which main.py contains statements like: from Cheesemonger.Counter import Counter ...and Co

Re: [IronPython] Groping in the dark

2006-12-01 Thread William Reade
Hi Patrick I haven't been able to see the anomalies you mention -- perhaps the following sample will help. --- import clr clr.AddReference("System.Windows.Forms") from System.Windows.Forms import ( Application, DockStyle, Form, Keys, MenuStrip, ToolStripMenuItem, Too

[IronPython] Patching sys.modules to hide CLR 'modules'

2007-03-20 Thread William Reade
*. Is this correct? If so, can I work around it, and what exciting pitfalls will I walk into if I try? William * That is to say, I cannot monkey-patch anything in sys.modules that didn't come from IronPython. -- William Reade Resolver Systems [EMAIL PROTECTED] Office address: