[IronPython] Silverlight, cannot import os module?

2008-04-16 Thread Dan Eloff
I've added os.py and ntpath.py to my .xap, but the trouble is os uses sys.builtin_module_names to detect platform, and there is no platform specific module in there for silverlight. Maybe it is os.py (using CPython 2.5 version) that needs to be changed to support a silverlight platform? Or to stop

Re: [IronPython] More Performance comparisons - dictionary updates and tuples

2008-04-16 Thread Dino Viehland
I'll have to look at these closer but I suspect fixing dict update performance will be a trivial change. We currently just go through some overly generic code path which works for any IDictionary. Unfortunately when used against a PythonDictionary we're going through a code path which is makin

Re: [IronPython] Learning IronPython

2008-04-16 Thread Ben Hall
Asking you loads of questions - haven't you noticed :) On Wed, Apr 16, 2008 at 11:52 PM, Michael Foord <[EMAIL PROTECTED]> wrote: > Ben Hall wrote: > > I've purchased Michael's book, read first 3 chapters - very good. It > > really is worth getting it now and getting ahead start :) > > > > > >

Re: [IronPython] Learning IronPython

2008-04-16 Thread Michael Foord
Ben Hall wrote: > I've purchased Michael's book, read first 3 chapters - very good. It > really is worth getting it now and getting ahead start :) > > Only the first three chapters - what have you been up to Ben. ;-) Michael > On Wed, Apr 16, 2008 at 8:40 PM, Michael Foord > <[EMAIL PROTECTED

Re: [IronPython] Learning IronPython

2008-04-16 Thread Ben Hall
I've purchased Michael's book, read first 3 chapters - very good. It really is worth getting it now and getting ahead start :) On Wed, Apr 16, 2008 at 8:40 PM, Michael Foord <[EMAIL PROTECTED]> wrote: > Tarun Kapoor wrote: > > Michael - do you have a date on when you book is coming out ? > > >

Re: [IronPython] POP3_SSL issue

2008-04-16 Thread Kar, Sujit
Thank you Curt and Michael for the explanation... I think the best thing to do for the time being would be to simply use CPython to get the data I need from the gmail mailboxes and let IronPython kick in after that. The processing is sequential, so a batch file to run the processes back to back

Re: [IronPython] Learning IronPython

2008-04-16 Thread Michael Foord
Tarun Kapoor wrote: > Michael - do you have a date on when you book is coming out ? > Hopefully July / August. There is already early access to the first 9 chapters (with more coming soon) via the early access program. Michael http://www.ironpythoninaction.com/ > Tarun Kapoor > Waterstone Cap

Re: [IronPython] POP3_SSL issue

2008-04-16 Thread Curt Hagenlocher
On Wed, Apr 16, 2008 at 12:20 PM, Kar, Sujit <[EMAIL PROTECTED]> wrote: > > Traceback (most recent call last): > File , line 0, in ##76 > File c:\python25\lib\poplib.py, line 359, in __init__ > AttributeError: 'module' object has no attribute 'ssl' > > If it is an extension module, then does that

Re: [IronPython] Learning IronPython

2008-04-16 Thread Tarun Kapoor
Michael - do you have a date on when you book is coming out ? Tarun Kapoor Waterstone Capital -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Philips Sent: Wednesday, April 16, 2008 2:22 PM To: users@lists.ironpython.com Subject: Re: [IronPython] Le

Re: [IronPython] POP3_SSL issue

2008-04-16 Thread Michael Foord
Kar, Sujit wrote: > Michael, > > The full trace is: > > Traceback (most recent call last): > File , line 0, in ##76 > File c:\python25\lib\poplib.py, line 359, in __init__ > AttributeError: 'module' object has no attribute 'ssl' > > If it is an extension module, then does that mean I cannot use

Re: [IronPython] Learning IronPython

2008-04-16 Thread Thomas Philips
Thank you, all, for the pointers. The IronPython cookbook appears to be exactly what I need right now, and I'll purchase the book by Michael Foord as soon as it is published. Thomas Philips ___ Users mailing list Users@lists.ironpython.com http://lists

Re: [IronPython] POP3_SSL issue

2008-04-16 Thread Kar, Sujit
Michael, The full trace is: Traceback (most recent call last): File , line 0, in ##76 File c:\python25\lib\poplib.py, line 359, in __init__ AttributeError: 'module' object has no attribute 'ssl' If it is an extension module, then does that mean I cannot use IronPython to do this? Thanks fo

Re: [IronPython] POP3_SSL issue

2008-04-16 Thread Michael Foord
Kar, Sujit wrote: > Hello, > > I am trying to access gmail via the POP3_SSL standard python library. > Ironpython is installed & so is Python2.5 and site.py has the necessay path > information. OS is Vista > > When I try to execute the following code in IronPython: > >mbox = poplib.POP3_SSL("

[IronPython] POP3_SSL issue

2008-04-16 Thread Kar, Sujit
Hello, I am trying to access gmail via the POP3_SSL standard python library. Ironpython is installed & so is Python2.5 and site.py has the necessay path information. OS is Vista When I try to execute the following code in IronPython: mbox = poplib.POP3_SSL("pop.gmail.com") I get an error m

Re: [IronPython] More Performance comparisons - dictionary updates and tuples

2008-04-16 Thread Michael Foord
Simon Dahlbacka wrote: > > from random import random > > try: >import clr >from System import DateTime > >def timeit(func): >start = DateTime.Now >func() >end = DateTime.Now >print func.__name__, 'took %s ms' % (end - >

Re: [IronPython] More Performance comparisons - dictionary updates and tuples

2008-04-16 Thread Simon Dahlbacka
> from random import random > > try: >import clr >from System import DateTime > >def timeit(func): >start = DateTime.Now >func() >end = DateTime.Now >print func.__name__, 'took %s ms' % (end - start).TotalMilliseconds Just a small nitpick or whatever, y

[IronPython] More Performance comparisons - dictionary updates and tuples

2008-04-16 Thread Michael Foord
Hello guys, I've been looking at performance in Resolver One. (Object creation in IronPython seems to be really good whereas dictionary lookups not so good when we compare against CPython.) It turns out that we are getting bitten quite badly by the performance of hashing tuples (fixing this fo

Re: [IronPython] Running an IronPython script with .NET 3.5

2008-04-16 Thread Dan Eloff
Well that explains a considerable amount :) What a confusing versioning scheme. Thanks for clearing that up. -Dan On Wed, Apr 16, 2008 at 10:10 AM, Miha Valencic <[EMAIL PROTECTED]> wrote: > Dan, AFAIK .NET 3.5 is actually .NET 2.0 with added extensions (WCF, WPF, > WWF...) on top of it. The CL

Re: [IronPython] Running an IronPython script with .NET 3.5

2008-04-16 Thread Miha Valencic
Dan, AFAIK .NET 3.5 is actually .NET 2.0 with added extensions (WCF, WPF, WWF...) on top of it. The CLR version is 2.0. It's a Microsoft thing, calling it .NET 3.5. Miha On Wed, Apr 16, 2008 at 5:06 PM, Dan Eloff <[EMAIL PROTECTED]> wrote: > This should be stupidly easy, but I'm not figuring it

[IronPython] Running an IronPython script with .NET 3.5

2008-04-16 Thread Dan Eloff
This should be stupidly easy, but I'm not figuring it out. I want to execute a IronPython script from the command line, so I try ipy script.py, but it seems it's only .NET 2*. How to get it to be .NET 3.5? *I assume .NET 2 because running ipy by itself prints: IronPython 2.0 Beta (2.0.0.1000) on

Re: [IronPython] Extending .NET Classes

2008-04-16 Thread Curt Hagenlocher
On Wed, Apr 16, 2008 at 5:47 AM, Dan Eloff <[EMAIL PROTECTED]> wrote: > I think I've already guessed the answer to this one, but I want to > hear it from someone else just to be thorough. > > There's no way to subclass, say Button, as SuperButton and then use > in XAML. Maybe if you involve some C

[IronPython] Extending .NET Classes

2008-04-16 Thread Dan Eloff
I think I've already guessed the answer to this one, but I want to hear it from someone else just to be thorough. There's no way to subclass, say Button, as SuperButton and then use in XAML. Maybe if you involve some C#? Certainly you could use SuperButton programmatically and add it to the xaml

Re: [IronPython] Learning IronPython

2008-04-16 Thread Curt Hagenlocher
On Wed, Apr 16, 2008 at 3:57 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > This is such good advice I'd like to quote it in my blog if that's OK > with you. Sure. I don't think it's actually original enough to warrant attribution, but I'd be happy to share the blame for anything that increases

Re: [IronPython] Learning IronPython

2008-04-16 Thread Steve Holden
Curt Hagenlocher wrote: > On Tue, Apr 15, 2008 at 7:32 PM, Thomas Philips <[EMAIL PROTECTED]> wrote: >> I program in Python, but my programs are typically run from the >> command line or IDLE. I have never built a GUI, and would like to try >> my hand at creating GUIs that I can run my programs fro

Re: [IronPython] Learning IronPython

2008-04-16 Thread Michael Foord
David Seruyange wrote: > Although it's not yet fully available, the Iron Python in Action book > will have a chapter devoted to WPF programming with IronPython. > Michael's helped me out a lot so I trust the book will be worth the > bucks. Find more here: http://www.manning.com/foord/ > Thank