[IronPython] site.py discrepancy

2006-07-05 Thread Simon Dahlbacka
if I put a site.py file with the following contents# begin site.pyprint "Hello World"# end site.pynext to IronPythonConsole.exeand start ironpython I get the following output:Hello World IronPython 1.0.60619 (Beta) on .NET 2.0.50727.42Copyright (c) Microsoft Corporation. All rights reserved.>>>so s

[IronPython] Constructor overloading

2006-07-05 Thread Andrzej Krzywda
Hello all, We are trying to create a .Net type object which has several one-parameter constructors. By default it does the wrong thing and we want to specify which constructor is called. We tried: Icon.__overloads__[Stream](myStream) Icon.__init__.__new__.__overloads__[Stream](myStream) but n

Re: [IronPython] Importing embedded .py files

2006-07-05 Thread Dino Viehland
I've opened a bug on CodePlex (bug 775 http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=775) to implement PEP-302 which seems to be the new version of ihooks (it says no one was satisfied w/ ihooks). I've opened it as a post-1.0 bug. -Original Message- Fro

Re: [IronPython] Importing embedded .py files

2006-07-05 Thread Dino Viehland
This is likely due to a Unicode / ASCII difference. I suspect that somewhere someone is calling str(xyz) or unicode(xyz) w/ a character that is outside of the ASCII range but also doesn't decode into Unicode. For an example of this you can look at bug 356 on CodePlex http://www.codeplex.com/Wo

Re: [IronPython] Constructor overloading

2006-07-05 Thread Dino Viehland
To do typeof you can do: import clr clr.GetClrType(pythonType) and then you can do the GetConstructor call. There have been some recent fixes which change the way overloading constructors works - you'll want to overload __new__ and not __init__. There was some potential for confusion here in

Re: [IronPython] Bug in time.strptime?

2006-07-05 Thread Dino Viehland
Sorry for the delay – it was a really long weekend for many of us.   Currently our strptime implementation is mostly built by translating from Python formatting codes to .NET formatting codes and then calling the .NET Formatting APIs.  There’s apparently a difference here in that .NET doe

Re: [IronPython] ironpython alternative to PyOS_ReadlineFunctionPointer

2006-07-05 Thread Dino Viehland
Thanks for the bug report - this one should be pretty easy to fix, we'll try and get it in for the next release. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jörgen Stenarson Sent: Tuesday, July 04, 2006 11:59 AM To: Discussion of IronPython Subject: R

Re: [IronPython] site.py discrepancy

2006-07-05 Thread Dino Viehland
Thanks for the bug report!  I’ve opened this on CodePlex as bug 778 - http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=778 – I’ve tentatively opened it against 1.0 RC, but I’ve left the priority low as I’m not sure what the possible underlying issue is here, or h

Re: [IronPython] Id: 356 unicode throws when creating a Unicode string from an invalid Unicode string (was Re: Importing embedded .py files)

2006-07-05 Thread Dino Viehland
Ahh, excellent! I hadn't seen this mail yet when I wrote my other one, and this is exactly what I wanted to see (the call to str). The only fix I can see for this at this time is supporting 2 different constructors for str & unicode, one which will throw if the conversion fails, and one which

Re: [IronPython] Odd behaviour from nested classes

2006-07-05 Thread Dino Viehland
Thanks for the bug report, I've opened CodePlex bug 779 - this is similar to another issue we saw recently but I don't think we fixed the type case. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Jacobs Sent: Monday, July 03, 2006 2:54 PM To: Di

Re: [IronPython] Array str/repr

2006-07-05 Thread Dino Viehland
Agreed! Thanks for the report, I've opened CodePlex bug 780 to track it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Monday, July 03, 2006 4:29 AM To: Discussion of IronPython Subject: [IronPython] Array str/repr This can be very

Re: [IronPython] Issue Tracker Components

2006-07-05 Thread Dino Viehland
I've added Console as another available component. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Monday, July 03, 2006 3:38 AM To: Discussion of IronPython Subject: [IronPython] Issue Tracker Components Hi, Currently, IronPython's I

[IronPython] help / help()

2006-07-05 Thread Simon Dahlbacka
CPython 2.4.1:>>> helpType help() for interactive help, or help(object) for help about object.>>> help()Welcome to Python 2.4!  This is the online help utility.If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://www.python.org/doc/tut/.Ent

[IronPython] __slots__ and __str__/__repr__

2006-07-05 Thread Simon Dahlbacka
CPython2.4.1>>>class foo(object):...    __slots__ = ["bar"]...>>>foo.bar>>> f = foo()>>> f.barTraceback (most recent call last):   File "", line 1, in ?AttributeError: barIronpython beta8>>>class foo(object):...    __slots__ = ["bar"]>>>foo.bar >>> f = foo()>>> f.barTraceback (most recent call last

Re: [IronPython] Constructor overloading

2006-07-05 Thread Shri Borde
I have opened http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=794 to track this. Do you want to help develop Dynamic languages on CLR? (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038) -Original Message-

Re: [IronPython] help / help()

2006-07-05 Thread Dino Viehland
Thanks for the report, I’ve opened bug 797 to track it: http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=797       From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Dahlbacka Sent: Wednesday, July 05, 2006 12:02 PM To: Discussion of IronP

Re: [IronPython] help / help()

2006-07-05 Thread Dino Viehland
Errr, that’s bug 796 for this one actually… http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=796   From: Dino Viehland Sent: Wednesday, July 05, 2006 2:08 PM To: Discussion of IronPython Subject: RE: [IronPython] help / help()   Thanks for the repo

Re: [IronPython] __slots__ and __str__/__repr__

2006-07-05 Thread Dino Viehland
Thanks again for the bug report.  I’ve opened bug 797  to track this one   http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=797   Is this currently blocking you?  The reason I ask is we’re only differing by a couple of things (the property name being the obvi

Re: [IronPython] __slots__ and __str__/__repr__

2006-07-05 Thread Simon Dahlbacka
no, not at all, I just played around at the console trying to find bugs.. :)That said, it probably would suck pretty badly if I was using doctest or something similar../SOn 7/6/06, Dino Viehland <[EMAIL PROTECTED]> wrote: Thanks again for the bug report.  I've opened bug 797  to track

[IronPython] Beta 8 and passing None for nullable arguments

2006-07-05 Thread Hogg, Jonathan
Title: Beta 8 and passing None for nullable arguments Hi there, With beta 7 I was able to call a (non-Python) method that expected Nullable arguments with either an object of type T or None. As of beta 8 I get an ArgumentType exception using None (expected Nullable, got NoneType). Is this

Re: [IronPython] __slots__ and __str__/__repr__

2006-07-05 Thread Dino Viehland
Cool, keep them coming J  We may not get to them all before 1.0 final, but it’s always good to know where we’re broken and what we need to improve on.   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Dahlbacka Sent: Wednesday, July 05, 2006 2:13 PM To: Discussion o

Re: [IronPython] Beta 8 and passing None for nullable arguments

2006-07-05 Thread Martin Maly
Title: Beta 8 and passing None for nullable arguments This is actually something that we just fixed today. It will be available in the next release, or prior to that, in the form of source code on CodePlex.   Martin   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf O

Re: [IronPython] Importing embedded .py files

2006-07-05 Thread Nathan R. Ernst
PEP-302 definitely sounds like what I had in mind (but wasn't quite so eloquently able to put into writing). Dino, et. al., please correct me if I'm wrong, but a PEP-302 based solution to the original problem would involve the installation of an object into sys.path_hooks that would return an impo

Re: [IronPython] Importing embedded .py files

2006-07-05 Thread Dino Viehland
I think you're correct on your understanding of PEP-302, but I only looked at it this morning for the first time :) Regarding the interfaces, we actually do a lot of this as we use interfaces internally - both for just providing reasonable functionality as well as providing fast paths rather th

Re: [IronPython] Importing embedded .py files

2006-07-05 Thread Nathan R. Ernst
Boy, if I read the IronPython source half as much as I read the mailing list, I'd probably be able most of my own questions, and 'wouldn't it be nice ifs...'. :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland Sent: Wednesday, July 05, 2006

[IronPython] Quick questions about connecting to other CLR languages

2006-07-05 Thread Kevin Bjorke
I'm writing in IP and trying to connect to code written in C# by other people if they have a function wanting a typeof(something) argument, how can I pass that from IP? if they have a templated function blah() how will that appear in IP? as multiple functions, or...? thanks KB -

Re: [IronPython] Quick questions about connecting to other CLR languages

2006-07-05 Thread Dino Viehland
You can pass a type object from Python directly to the function, and we'll convert it into the CLR type along the way. Alternately you can import clr and then do clr.GetClrType(somePythonType). For example you should be able to pass str, int, bool, etc... through and have it just work. Generi