[IronPython] Making A Windows Form App

Freddie Witherden freddiewitherden at hotmail.com
Thu Jul 7 20:47:39 CEST 2005

.net is a lot like Java, and we can be quite sure that many moons ago the 
JPython team (as it was then known) had the same problem with Java modules, 
and probably had a long and heated debate about it so I think we should do 
it 'the Jython way' as there have never been any problems with it and lots 
of people use Jython so it must work.

>From: Jim Hugunin <jimhug at exchange.microsoft.com>
>Reply-To: Discussion of IronPython 
><users-ironpython.com at lists.ironpython.com>
>To: "Discussion of IronPython" <users-ironpython.com at lists.ironpython.com>
>Subject: RE: [IronPython] Making A Windows Form App
>Date: Wed, 6 Jul 2005 17:23:55 -0700
>MIME-Version: 1.0
>Received: from moutng.kundenserver.de ([]) by 
>mc4-f18.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Jul 2005 
>17:24:13 -0700
>Received: from [] (helo=frida.dreamhost.com)by 
>mxeu11.kundenserver.de with ESMTP (Nemesis),id 0MKuA8-1DqKBQ3a3n-0005pt for 
>freddie at pislice.com; Thu, 07 Jul 2005 02:24:04 +0200
>Received: from che.dreamhost.com (che.dreamhost.com [])by 
>frida.dreamhost.com (Postfix) with ESMTPid 880F316D56B; Wed,  6 Jul 2005 
>17:24:03 -0700 (PDT)
>Received: from che.dreamhost.com (localhost [])by 
>che.dreamhost.com (Postfix) with ESMTPid 4D3FB1BA82; Wed,  6 Jul 2005 
>17:23:59 -0700 (PDT)
>Received: from mail1.exchange.microsoft.com 
>(mail1.exchange.microsoft.com[])by che.dreamhost.com 
>(Postfix) with ESMTP id F39541BA63for 
><users-ironpython.com at lists.ironpython.com>;Wed,  6 Jul 2005 17:23:56 -0700 
>Received: from DF-GWY-01.Exchange.Corp.Microsoft.com ([]) 
>bymail1.exchange.microsoft.com over TLS secured channel withMicrosoft 
>SMTPSVC(6.0.3790.1830); Wed, 6 Jul 2005 17:22:12 -0700
>Received: from df-hub-01.exchange.corp.microsoft.com ( 
>byDF-GWY-01.Exchange.Corp.microsoft.com ( with MicrosoftSMTP 
>Server id 8.0.324.11; Thu, 7 Jul 2005 00:22:12 +0000
>Received: from df-hub-01.exchange.corp.microsoft.com ([]) 
>bydf-hub-01.exchange.corp.microsoft.com with 
>MicrosoftSMTPSVC(6.0.3790.1830); Wed, 6 Jul 2005 17:22:12 -0700
>Received: from DF-BANDIT-BHD.Exchange.Microsoft.com ([]) 
>bydf-hub-01.exchange.corp.microsoft.com over TLS secured channel 
>withMicrosoft SMTPSVC(6.0.3790.1830); Wed, 6 Jul 2005 17:22:12 -0700
>X-Message-Info: JGTYoYF78jFojgLyvLebIfsbiobYIaFJ60Vutv4BY8A=
>Delivered-To: users-ironpython.com at che.dreamhost.com
>Content-Class: urn:content-classes:message
>X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
>X-OriginalArrivalTime: 07 Jul 2005 00:22:12.0177 
>X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [IronPython] Making A 
>Windows Form App
>Thread-Index: AcWCZWV8ChLmjDVBQuSUEVbp1jOpZQAARvlAAADzv3MAB2xg0A==
>X-BeenThere: users-ironpython.com at lists.ironpython.com
>X-Mailman-Version: 2.1.5
>Precedence: list
>List-Id: Discussion of IronPython 
><http://lists.ironpython.com/listinfo.cgi/users-ironpython.com>,<mailto:users-ironpython.com-request at lists.ironpython.com?subject=unsubscribe>
>List-Post: <mailto:users-ironpython.com at lists.ironpython.com>
><mailto:users-ironpython.com-request at lists.ironpython.com?subject=help>
><http://lists.ironpython.com/listinfo.cgi/users-ironpython.com>,<mailto:users-ironpython.com-request at lists.ironpython.com?subject=subscribe>
>Errors-To: users-ironpython.com-bounces at lists.ironpython.com
>Return-Path: users-ironpython.com-bounces at lists.ironpython.com
>We clearly need a better design than the current sys.LoadAssembly* methods. 
>  For one thing, we shouldn't really be adding these to the existing sys 
>module but putting new methods like this in a new IronPython module.  As 
>you point out, we should also do a better job of making this as invisible 
>to the user as possible.
>In IronPython-0.6, a much larger number of assemblies were automatically 
>searched for - including the two shown below.  This meant that this 
>particular program could run without any of this nonsense.  The problem 
>here was that this just delayed the issue of people learning about this 
>issue and made things even more confusing when they wanted to use an 
>assembly that wasn't in the known list.  I decided that at this stage it 
>was better to raise this issue front-and-center so that people would be 
>aware of it and hopefully get quickly familiar with it.  The other reason I 
>wanted to make this more explicit was in the hopes that it would spur 
>discussion about better ways of solving the problem.
>I'm certain that sys.LoadAssembly* is not what will ship with 
>IronPython-1.0.  Here are a few possible options in no particular order.
>1. Guess the assembly based on the path, i.e. import System.Drawing will 
>try to load "System.Drawing".  This would be great if it was a naming 
>convention that was consistently followed, but alas it is a rule that is so 
>consistently broken I'm doubtful of the benefits.
>2. Add a config file to specific a large set of default known assemblies 
>and have the user extend this with their own.  This ties scripts and config 
>files together in a deeper way than I'd prefer.
>3. Extend import, i.e. import System.Drawing from System.Drawing.  Of 
>course, the most obvious ways to do this are a change to the Python 
>4. Search some well-known directories to come up with a list of known 
>assemblies and their types and then load assemblies strictly as needed for 
>imports.  This would add many seconds to start-up time unless this 
>information is cached and caches are their own source of trouble. FYI - 
>This is closest to what Jython does.
>5. I'm sure there are other good ideas out there...
>There's a whole separate question as to whether or not any loading by 
>partial name is too dangerous even as explicit as it is today, see here:
>Thanks - Jim
>From: users-ironpython.com-bounces at lists.ironpython.com 
>[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of 
>Keith J. Farmer
>Sent: Wednesday, July 06, 2005 1:36 PM
>To: Discussion of IronPython
>Subject: RE: [IronPython] Making A Windows Form App
>Out of curiosity, would it be possible to get IronPython to make a 
>best-guess attempt at automatically loading an appropriate assembly, if it 
>discovers that it doesn't know the namespace?
>This could alleviate the problems people have with remembering 
>From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Martin 
>Sent: Wed 7/6/2005 1:13 PM
>import sys
>users-ironpython.com mailing list
>users-ironpython.com at lists.ironpython.com

More information about the Ironpython-users mailing list