RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Keith J. Farmer








Just noticing this warning.. Is LoadWithPartialName
expected to remain in 2.0 since it’s close to RTM?

 

'System.Reflection.Assembly.LoadWithPartialName(string)'
is obsolete: 'This method has been deprecated. Please use Assembly.Load()
instead. http://go.microsoft.com/fwlink/?linkid=14202'

 

C:\Program Files
(x86)\IronPython-0.9\IronPython\Objects\ReflectedPackage.cs line 72   column
25

 

…..

 

Tab completion’s cool J

 

Have you been able to run the tests on XP
x64 yet?  I tried TestAll.py and it skipped Pystone, ParrotBench, and Python
Regression.

 



-

Keith J. Farmer

[EMAIL PROTECTED]





 








___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 0.9 released

2005-08-04 Thread Lorenzo Bolognini
On 8/2/05, Martin Maly <[EMAIL PROTECTED]> wrote:

>  Known issues: 
>Rebuilding IronPython on the Community Technology Preview release,
> version 2.0.50630.0 will fix the problem. We decided to maintain the
> dependency of the released binaries on .NET 2.0 Beta 2 (version
> 2.0.50215.44) because we believe the Beta 2 release is more widely adopted. 

So basically what's the story for the .NET 2 runtime support? Will you
make it possible to integrate IronPy in VS .NET 2005 final release and
use the .NET 2 runtime to develop ASP .NET apps?

If I remember correctly IronPy 1.0 will only be compatible with the
1.1 runtime. Will it support something like partial classes à la C# so
that the code-behind file doesn't get polluted with the IDE generated
code? I wouldn't really care about other .NET 2 features if I could
have that so I would happily use .NET 1.1 to develop aspx.

Thanks,
Lorenzo
___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] [0.9] Tab completion bug

2005-08-04 Thread Keith J. Farmer








Enter in several lines, play around with
tab completion.

 

Then enter:

 

>>> def foo():

... 

 

Yields:

 

... previous tab completion results

 

Apparently the buffer holding the
_expression_ to complete isn’t cleared after a new line is started.

 

Also, in the event that we are at the
start of a line, such that the _expression_ buffer is clear, could we insert a
tab?  I know others out there love their space bar, but I’m a tab
guy, myself J

 



-

Keith J. Farmer

[EMAIL PROTECTED]





 








___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Keith J. Farmer
I'm not sure where you got the idea that IronPython 1.0 only works with .NET 
1.1?
I can compile the IronPython solution using the VS 2005 Beta 2 release (and 
have, several times tonight).  For what it's worth, IronPython needs the 2.0 
runtime, since it uses 2.0 code generation, and supports 2.0 generics.
As far as ASP.NET compiling pages written in IronPython, my memory is that 
ASP.NET would need to be modified to recognize a new language.  At least, 
that's the case in 1.1; it's possible that 2.0 is more extensible in this 
regard (wish list if not).
Speculation:  you should be able to subclass Pages in IronPython, and then 
modify the aspx page to inherit from your IronPython class.  Of course, we'd 
need to have compilation running (is that on the list for 1.0?).
-
Keith J. Farmer
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lorenzo Bolognini

So basically what's the story for the .NET 2 runtime support? Will you
make it possible to integrate IronPy in VS .NET 2005 final release and
use the .NET 2 runtime to develop ASP .NET apps?

If I remember correctly IronPy 1.0 will only be compatible with the
1.1 runtime. Will it support something like partial classes à la C# so
that the code-behind file doesn't get polluted with the IDE generated
code? I wouldn't really care about other .NET 2 features if I could
have that so I would happily use .NET 1.1 to develop aspx.

___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Building IronPython 0.9 with Mono

2005-08-04 Thread Seo Sanghyeon
Hello,

I tried to build IronPython 0.9 with Mono. I used Debian package currently
in Sid to do so.

With attached "patch", I succeeded building it, but it doesn't really
run. Transcript follows:

 * * *

[EMAIL PROTECTED]:~/fepy$ mono --version
Mono JIT compiler version 1.1.8.2, (C) 2002-2005 Novell, Inc and Contributors. 
www.mono-project.com
TLS:   normal
GC:Included Boehm (with typed GC)
SIGSEGV  : normal
Globalization: normal
[EMAIL PROTECTED]:~/fepy$ gmcs --version
Mono C# compiler version 1.1.5.0

 * * *

[EMAIL PROTECTED]:~/fepy$ ls
IronPython-0.9.zip  mono-build.patch
[EMAIL PROTECTED]:~/fepy$ unzip -q IronPython-0.9.zip
[EMAIL PROTECTED]:~/fepy$ patch -p0 < mono-build.patch
patching file IronPython-0.9/IronPython/Hosting/PythonEngine.cs
patching file IronPython-0.9/IronPython/Modules/__builtin__.cs
patching file IronPython-0.9/IronPython/Objects/PythonFile.cs
patching file IronPython-0.9/IronPython/Objects/ReflectedPackage.cs
patching file IronPython-0.9/IronPython/Objects/StringOps.cs
patching file IronPython-0.9/IronPythonConsole/PythonCommandLine.cs
patching file IronPython-0.9/IronPythonConsole/SuperConsole.cs
patching file IronPython-0.9/makefile

 * * *

[EMAIL PROTECTED]:~/fepy$ cd IronPython-0.9
[EMAIL PROTECTED]:~/fepy/IronPython-0.9$ rm -rf bin
[EMAIL PROTECTED]:~/fepy/IronPython-0.9$ mkdir bin
[EMAIL PROTECTED]:~/fepy/IronPython-0.9$ make
gmcs -warn:0 -t:library -out:bin/IronMath.dll -recurse:IronMath/*.cs
gmcs -warn:0 -t:library -r:bin/IronMath.dll -out:bin/IronPython.dll 
-recurse:IronPython/*.cs
gmcs -warn:0 -t:exe -r:bin/IronPython.dll -out:bin/IronPythonConsole.exe 
-recurse:IronPythonConsole/*.cs

 * * *

[EMAIL PROTECTED]:~/fepy/IronPython-0.9$ mono bin/IronPythonConsole.exe
IronPython 0.9.2042 on .NET 2.0.50215.16
Copyright (c) Microsoft Corporation. All rights reserved.
>>> 1 + 1
System.NullReferenceException: Object reference not set to an instance of an 
object
in <0x00010> IronPython.Objects.Frame:SetGlobal (System.String name, 
System.Object value)
in <0x00067> input_0:Run (IronPython.Objects.Frame frame)
in <0x002b0> IronPython.Hosting.PythonEngine:DoOneInteractive 
(IronPython.Objects.Frame topFrame)
in <0x00064> IronPython.Hosting.PythonEngine:RunInteractive ()
>>>

 * * *

Any idea?

Seo Sanghyeon
diff -ur IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs 
IronPython-0.9/IronPython/Hosting/PythonEngine.cs
--- IronPython-0.9.old/IronPython/Hosting/PythonEngine.cs   2005-07-29 
11:21:38.0 +0900
+++ IronPython-0.9/IronPython/Hosting/PythonEngine.cs   2005-08-04 
11:52:59.426015816 +0900
@@ -258,19 +258,10 @@
 if (ExceptionDetail) {
 MyConsole.WriteLine(e.ToString(), Style.Error);
 } else {
-string stack = e.StackTrace;
 MyConsole.Write(e.GetType().ToString(), Style.Error);
 MyConsole.Write(": ", Style.Error);
 MyConsole.WriteLine(e.Message, Style.Error);
-string[] frames = stack.Split(new string[] { "\r\n" }, 
StringSplitOptions.RemoveEmptyEntries);
-foreach (string frame in frames) {
-if (frame.StartsWith("   at IronPython.") ||
-frame.StartsWith("   at ReflectOpt.") ||
-frame.StartsWith("   at IronPythonConsole.")) {
-continue;
-}
-MyConsole.WriteLine(frame, Style.Error);
-}
+MyConsole.WriteLine(e.StackTrace, Style.Error);
 }
 e = e.InnerException;
 }
diff -ur IronPython-0.9.old/IronPython/Modules/__builtin__.cs 
IronPython-0.9/IronPython/Modules/__builtin__.cs
--- IronPython-0.9.old/IronPython/Modules/__builtin__.cs2005-07-26 
03:53:24.0 +0900
+++ IronPython-0.9/IronPython/Modules/__builtin__.cs2005-08-04 
11:54:10.899150248 +0900
@@ -576,13 +576,13 @@
 }
 
 public static double round(double x) {
-return Math.Round(x, MidpointRounding.AwayFromZero);
+return Math.Round(x);
 }
 
 public static double round(double x, int n) {
 if (n < 0) { //!!! certinaly imprecise
 double factor = Math.Pow(10.0, -n);
-return factor * Math.Round(x / factor, 
MidpointRounding.AwayFromZero);
+return factor * Math.Round(x / factor);
 }
 return Math.Round(x, n);
 }
@@ -725,4 +725,4 @@
 public static object WindowsError = 
Ops.GetDynamicTypeFromType(typeof(PythonWindowsError));
 #endregion
 }
-}
\ No newline at end of file
+}
diff -ur IronPython-0.9.old/IronPython/Objects/PythonFile.cs 
IronPython-0.9/IronPython/Objects/PythonFile.cs
--- IronPython-0.9.old/IronPython/Objects/PythonFile.cs 2005-07-23 
22:48:06.0 +0900
+++ IronP

[IronPython] Access to Enumeration Values

2005-08-04 Thread Anthony Tarlano
the namespace System.Net.Sockets contains an enumation type named
SocketOptionName for retrieving Socket options. It's definition is:

public enum SocketOptionName
{
  // Fields
  AcceptConnection = 2,
  AddMembership = 12,
  AddSourceMembership = 15,
  BlockSource = 0x11,
  Broadcast = 0x20,
  BsdUrgent = 2,
  ChecksumCoverage = 20,
  Debug = 1,
  DontFragment = 14,
  DontLinger = -129,
  DontRoute = 0x10,
  DropMembership = 13,
  DropSourceMembership = 0x10,
  Error = 0x1007,
  ExclusiveAddressUse = -5,
  Expedited = 2,
  HeaderIncluded = 2,
  HopLimit = 0x15,
  IPOptions = 1,
  IpTimeToLive = 4,
  IPv6ProtectionLevel = 0x17,
  KeepAlive = 8,
  Linger = 0x80,
  MaxConnections = 0x7fff,
  MulticastInterface = 9,
  MulticastLoopback = 11,
  MulticastTimeToLive = 10,
  NoChecksum = 1,
  NoDelay = 1,
  OutOfBandInline = 0x100,
  PacketInformation = 0x13,
  ReceiveBuffer = 0x1002,
  ReceiveLowWater = 0x1004,
  ReceiveTimeout = 0x1006,
  ReuseAddress = 4,
  SendBuffer = 0x1001,
  SendLowWater = 0x1003,
  SendTimeout = 0x1005,
  Type = 0x1008,
  TypeOfService = 3,
  UnblockSource = 0x12,
  UpdateAcceptContext = 0x700b,
  UpdateConnectContext = 0x7010,
  UseLoopback = 0x40
}

Upon accessing an enumeration value by name IronPython only returns
its name as a string... If this isn't a bug then it should be... see
this output

IronPython 0.9.2036 on .NET 2.0.50215.44
Copyright (c) Microsoft Corporation. All rights reserved.
>>> from System.Net.Sockets import SocketOptionName
>>> SocketOptionName

>>> SocketOptionName.MaxConnections
MaxConnections
>>> SocketOptionName.MaxConnections.value__
2147483647
>>>

Anthony
___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] Access to Enumeration Values

2005-08-04 Thread Martin Maly
Hi Anthony,

I don't think it is a bug. The value you get when getting an enum value
(SocketOptionName.Broadcast) is indeed the value itself:

x = SocketOptions.Broadcast

x becomes a boxed enum object. It is the ToString() method of the enum
object prints the name. Consider following C# code that does exactly the
same:

using System.Net.Sockets;
namespace Test {
public class Program {
static void Main(string[] args) {
Console.WriteLine(SocketOptionName.Broadcast);
}
}
}

Does that answer the question?

Martin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Anthony Tarlano
Sent: Thursday, August 04, 2005 9:12 AM
To: Discussion of IronPython
Subject: [IronPython] Access to Enumeration Values

the namespace System.Net.Sockets contains an enumation type named
SocketOptionName for retrieving Socket options. It's definition is:

public enum SocketOptionName
{
  // Fields
  AcceptConnection = 2,
  AddMembership = 12,
  AddSourceMembership = 15,
  BlockSource = 0x11,
  Broadcast = 0x20,
  BsdUrgent = 2,
  ChecksumCoverage = 20,
  Debug = 1,
  DontFragment = 14,
  DontLinger = -129,
  DontRoute = 0x10,
  DropMembership = 13,
  DropSourceMembership = 0x10,
  Error = 0x1007,
  ExclusiveAddressUse = -5,
  Expedited = 2,
  HeaderIncluded = 2,
  HopLimit = 0x15,
  IPOptions = 1,
  IpTimeToLive = 4,
  IPv6ProtectionLevel = 0x17,
  KeepAlive = 8,
  Linger = 0x80,
  MaxConnections = 0x7fff,
  MulticastInterface = 9,
  MulticastLoopback = 11,
  MulticastTimeToLive = 10,
  NoChecksum = 1,
  NoDelay = 1,
  OutOfBandInline = 0x100,
  PacketInformation = 0x13,
  ReceiveBuffer = 0x1002,
  ReceiveLowWater = 0x1004,
  ReceiveTimeout = 0x1006,
  ReuseAddress = 4,
  SendBuffer = 0x1001,
  SendLowWater = 0x1003,
  SendTimeout = 0x1005,
  Type = 0x1008,
  TypeOfService = 3,
  UnblockSource = 0x12,
  UpdateAcceptContext = 0x700b,
  UpdateConnectContext = 0x7010,
  UseLoopback = 0x40
}

Upon accessing an enumeration value by name IronPython only returns its
name as a string... If this isn't a bug then it should be... see this
output

IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft
Corporation. All rights reserved.
>>> from System.Net.Sockets import SocketOptionName SocketOptionName

>>> SocketOptionName.MaxConnections
MaxConnections
>>> SocketOptionName.MaxConnections.value__
2147483647
>>>

Anthony
___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] [0.9] Tab completion bug

2005-08-04 Thread Martin Maly

Yes, it is a known problem. The tab-completion is far, far from finished and this is probably the first thing for me to fix - pressing tab at the beginning of the line should not offer options, but simply tab out.

 

Thanks for feedback!

MArtin

From: Keith J. Farmer
Sent: 8/4/2005 2:44 AM
To: Discussion of IronPython
Subject: [IronPython] [0.9] Tab completion bug






Enter in several lines, play around with tab completion.

 

Then enter:

 

>>> def foo():

... 

 

Yields:

 

... previous tab completion results

 

Apparently the buffer holding the _expression_ to complete isn’t cleared after a new line is started.

 

Also, in the event that we are at the start of a line, such that the _expression_ buffer is clear, could we insert a tab?  I know others out there love their space bar, but I’m a tab guy, myself J

 


-

Keith J. Farmer

[EMAIL PROTECTED]



 


___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Martin Maly
Title: RE: [IronPython] IronPython 0.9 released






Hi Lorenzo,


Since the .Net 2.0 final has not yet been released, we continue to product our builds on .NET 2.0 Beta 2 which was publicly released and is, in our opinion, most widely adopted by our users. As soon as .Net 2.0 ships its final version, IronPython will start using that build to run on. The known issue I was referring to is caused by the fact that IronPython was caught betwen two different .Net 2.0 public preview releases - Beta 2 and Community Technology Preview. We decided to stay with Beta 2 as the version to work with out of the box (you can still compile IronPython on the Technology preview of.Net and run it just fine). As I said, come the final release of .Net 2.0, IronPython will move forward to run on that out of the box. This may mean some necessary changes in the IronPython code base (so far there are none required, but there may be some) but obviously, it is the right thing to do.

As for running IronPython on .Net 1.1 ... currently IronPython doesn't run on 1.1 and we are currently thinking whether we should create version of IronPython that would run on .Net 1.1. It would mean that some IronPython features may not be available on .Net 1.1 but it may be useful for some users who for some reason may not be switching to .Net 2.0 immediately. We haven't reached decision on this one yet and it would be interesting to hear feedback as to how important having a version if IronPython running on .Net 1.1 is for you.

I hope I didn't miss anything and this answers your question.


Martin




From: Lorenzo Bolognini

Sent: 8/4/2005 2:40 AM

To: Discussion of IronPython

Cc:

Subject: Re: [IronPython] IronPython 0.9 released


On 8/2/05, Martin Maly <[EMAIL PROTECTED]> wrote:


>  Known issues:

>Rebuilding IronPython on the Community Technology Preview release,

> version 2.0.50630.0 will fix the problem. We decided to maintain the

> dependency of the released binaries on .NET 2.0 Beta 2 (version

> 2.0.50215.44) because we believe the Beta 2 release is more widely adopted.


So basically what's the story for the .NET 2 runtime support? Will you

make it possible to integrate IronPy in VS .NET 2005 final release and

use the .NET 2 runtime to develop ASP .NET apps?


If I remember correctly IronPy 1.0 will only be compatible with the

1.1 runtime. Will it support something like partial classes à la C# so

that the code-behind file doesn't get polluted with the IDE generated

code? I wouldn't really care about other .NET 2 features if I could

have that so I would happily use .NET 1.1 to develop aspx.


Thanks,

Lorenzo

___

users-ironpython.com mailing list

users-ironpython.com@lists.ironpython.com

http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Martin Maly
Title: RE: [IronPython] IronPython 0.9 released






As for the static compilation, it is another 'maybe' for 1.0 and we are not decided one way or another (it is another topic you can provide feedback on and let us know how important it is to you).

For the 0.9 I actually went somewhat further with the static compilation story and made the whole test suite to run from the compiled exes. Surely, it is not the answer to the 'static compilation' problem, but in the least somewhat more complicated scripts (i.e. those that used import) can run in some cases. So the story is slowly getting better already, but it still has a long way to go to be perfect and we are trying to determine the importance for our users to help use choose whether to try and implement it for 1.0 or later.

Martin




From: Keith J. Farmer

Sent: 8/4/2005 3:11 AM

To: Discussion of IronPython

Cc:

Subject: RE: [IronPython] IronPython 0.9 released


I'm not sure where you got the idea that IronPython 1.0 only works with .NET 1.1?

I can compile the IronPython solution using the VS 2005 Beta 2 release (and have, several times tonight).  For what it's worth, IronPython needs the 2.0 runtime, since it uses 2.0 code generation, and supports 2.0 generics.

As far as ASP.NET compiling pages written in IronPython, my memory is that ASP.NET would need to be modified to recognize a new language.  At least, that's the case in 1.1; it's possible that 2.0 is more extensible in this regard (wish list if not).

Speculation:  you should be able to subclass Pages in IronPython, and then modify the aspx page to inherit from your IronPython class.  Of course, we'd need to have compilation running (is that on the list for 1.0?).

-

Keith J. Farmer

[EMAIL PROTECTED]


-Original Message-

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Lorenzo Bolognini

So basically what's the story for the .NET 2 runtime support? Will you

make it possible to integrate IronPy in VS .NET 2005 final release and

use the .NET 2 runtime to develop ASP .NET apps?


If I remember correctly IronPy 1.0 will only be compatible with the

1.1 runtime. Will it support something like partial classes à la C# so

that the code-behind file doesn't get polluted with the IDE generated

code? I wouldn't really care about other .NET 2 features if I could

have that so I would happily use .NET 1.1 to develop aspx.


___

users-ironpython.com mailing list

users-ironpython.com@lists.ironpython.com

http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Martin Maly

Hi Keith!

 

LoadWithPartialName may be indeed removed as the build-time warning suggests suggests. There is a good reasoning behind removing the method (what version, from where, etc ... would the method call load? I think there is a blog out there that talks more about the reasoning:

 

http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx


When the method is removed, IronPython will have to cease using it. At the alpha-stage of the development we chose to take advantage of it, but we will find a long-term solution in the due time.

 

The test skipping Pystone, Parrotbench and CPython regression test suites is correct behavior. These tests are not shipping with our code so I wrote the test script so that if it doesn't find them in expected locations, it will skip the tests. Once I am back in Redmond, I am going to post instructions where from to download what to get the tests running. At least pystone and partotbench. Problem with CPython regression test suite is that we had to make few modifications to the test suite code to get it running so it may be more complicated to get those tests running. However, as we work on running the CPython tests (one of major items on our list from now on) the need for modifying them will be less and hopefully soon everyone will be able to run them without modifications.

 

Martin


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith J. Farmer
Sent: Thursday, August 04, 2005 2:18 AM
To: Discussion of IronPython
Subject: RE: [IronPython] IronPython 0.9 released






Just noticing this warning.. Is LoadWithPartialName expected to remain in 2.0 since it’s close to RTM?

 

'System.Reflection.Assembly.LoadWithPartialName(string)' is obsolete: 'This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202'

 

C:\Program Files (x86)\IronPython-0.9\IronPython\Objects\ReflectedPackage.cs line 72   column 25

 

…..

 

Tab completion’s cool J

 

Have you been able to run the tests on XP x64 yet?  I tried TestAll.py and it skipped Pystone, ParrotBench, and Python Regression.

 


-

Keith J. Farmer

[EMAIL PROTECTED]



 

___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Keith J. Farmer
Yeah, I think you've got the priority right for my tastes:  CPython parity 
before CLR producer status.
 
Somehow, I don't think it'll take much longer for y'all.



From: [EMAIL PROTECTED] on behalf of Martin Maly
Sent: Thu 8/4/2005 12:21 PM
To: Discussion of IronPython; Discussion of IronPython
Subject: RE: [IronPython] IronPython 0.9 released



As for the static compilation, it is another 'maybe' for 1.0 and we are not 
decided one way or another (it is another topic you can provide feedback on and 
let us know how important it is to you).

 

<>___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] IronPython 0.9 released

2005-08-04 Thread Tom Clancy
>We haven't reached decision on this one yet and it would be
interesting to hear feedback as
>to how important having a version if IronPython running on .Net 1.1 is for you.

It would be the only way I'd get to use it at work, so I'd love to
have a 1.1 version, even if it sacrifices some support.

Thanks,

Tom
___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


RE: [IronPython] Access to Enumeration Values

2005-08-04 Thread Martin Maly
Title: RE: [IronPython] Access to Enumeration Values






I agree with the automatic conversion and the ability to pass then into int(enum) to get the value out. I think that it makes sense to keep the rest as is, such as print the "Broadcast" when the enum value is such.

Thanks for the feedback, it is a good point.


Martin




From: Anthony Tarlano

Sent: 8/4/2005 1:22 PM

To: Martin Maly

Cc: Anthony TarlanoDiscussion of IronPython

Subject: Re: [IronPython] Access to Enumeration Values


Martin,


I still think it can be made better. For example, if in c# I could say:


i = (int) SocketOptionName.Broadcast;


I can get the correct value, but in IronPython I can't say:


int(SocketOptionName.Broadcast)


since I will not get the correct value back.


I do see your point, but I think that for enumerations they should

either support conversion using standards functions such as int(), or

hex(), and not make programmers have to append the ".value__" just to

get the value, which in my humble opinion is unpythonic and just so

far off c# that some thought should be given to fix it.


Anthony



On 8/4/05, Martin Maly <[EMAIL PROTECTED]> wrote:

> Hi Anthony,

>

> I don't think it is a bug. The value you get when getting an enum value

> (SocketOptionName.Broadcast) is indeed the value itself:

>

> x = SocketOptions.Broadcast

>

> x becomes a boxed enum object. It is the ToString() method of the enum

> object prints the name. Consider following C# code that does exactly the

> same:

>

> using System.Net.Sockets;

> namespace Test {

> public class Program {

> static void Main(string[] args) {

> Console.WriteLine(SocketOptionName.Broadcast);

> }

> }

> }

>

> Does that answer the question?

>

> Martin

>

> -Original Message-

> From: [EMAIL PROTECTED]

> [mailto:[EMAIL PROTECTED]] On Behalf Of

> Anthony Tarlano

> Sent: Thursday, August 04, 2005 9:12 AM

> To: Discussion of IronPython

> Subject: [IronPython] Access to Enumeration Values

>

> the namespace System.Net.Sockets contains an enumation type named

> SocketOptionName for retrieving Socket options. It's definition is:

>

> public enum SocketOptionName

> {

>   // Fields

>   AcceptConnection = 2,

>   AddMembership = 12,

>   AddSourceMembership = 15,

>   BlockSource = 0x11,

>   Broadcast = 0x20,

>   BsdUrgent = 2,

>   ChecksumCoverage = 20,

>   Debug = 1,

>   DontFragment = 14,

>   DontLinger = -129,

>   DontRoute = 0x10,

>   DropMembership = 13,

>   DropSourceMembership = 0x10,

>   Error = 0x1007,

>   ExclusiveAddressUse = -5,

>   Expedited = 2,

>   HeaderIncluded = 2,

>   HopLimit = 0x15,

>   IPOptions = 1,

>   IpTimeToLive = 4,

>   IPv6ProtectionLevel = 0x17,

>   KeepAlive = 8,

>   Linger = 0x80,

>   MaxConnections = 0x7fff,

>   MulticastInterface = 9,

>   MulticastLoopback = 11,

>   MulticastTimeToLive = 10,

>   NoChecksum = 1,

>   NoDelay = 1,

>   OutOfBandInline = 0x100,

>   PacketInformation = 0x13,

>   ReceiveBuffer = 0x1002,

>   ReceiveLowWater = 0x1004,

>   ReceiveTimeout = 0x1006,

>   ReuseAddress = 4,

>   SendBuffer = 0x1001,

>   SendLowWater = 0x1003,

>   SendTimeout = 0x1005,

>   Type = 0x1008,

>   TypeOfService = 3,

>   UnblockSource = 0x12,

>   UpdateAcceptContext = 0x700b,

>   UpdateConnectContext = 0x7010,

>   UseLoopback = 0x40

> }

>

> Upon accessing an enumeration value by name IronPython only returns its

> name as a string... If this isn't a bug then it should be... see this

> output

>

> IronPython 0.9.2036 on .NET 2.0.50215.44 Copyright (c) Microsoft

> Corporation. All rights reserved.

> >>> from System.Net.Sockets import SocketOptionName SocketOptionName

> 

> >>> SocketOptionName.MaxConnections

> MaxConnections

> >>> SocketOptionName.MaxConnections.value__

> 2147483647

> >>>

>

> Anthony

>



___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] IronPython in ASP.NET

2005-08-04 Thread Keith J. Farmer
[Python.. ASP.. the combination seems natural to me ;)]

Got this reponse from Scott Guthrie.  So I suppose it's a matter of digging 
around and seeing exactly how to use the hooks:

Hi Keith,

ASP.NET actually has pluggable language support even in V1.1.  It is
driven using the CodeDOM model, and can be configured in your
machine.config and web.config files.

Hope this helps,

Scott

-Original Message-
From: Keith J. Farmer [mailto:[EMAIL PROTECTED]  ]
Sent: Thursday, August 04, 2005 12:47 PM
To: Scott Guthrie
Subject: RE: Atlas -- CodeDOM? (via ScottGu's Blog)

Since you're there -- there was a question on the IronPython list about
using it to create aspx.  I'm pretty certain the language offerings in
1.1 were hardcoded:  is that still the case in 2.0, or is there a
build-provider-like registry of filetypes and language tags to
compilers?

<>___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] RE: IronPython in ASP.NET

2005-08-04 Thread Keith J. Farmer
So as soon as there's a PythonCodeProvider, I think it could be done.
 
configuration/system.web/compilation/compilers/compiler
 
Here's from my 1.1 machine.config:
 
 
- 
- 
   
   
   
   
  
- 
   
   
   
   
   
   
   
   
   
   
  
  



From: [EMAIL PROTECTED] on behalf of Keith J. Farmer
Sent: Thu 8/4/2005 2:44 PM
To: Discussion of IronPython
Subject: IronPython in ASP.NET



[Python.. ASP.. the combination seems natural to me ;)]

Got this reponse from Scott Guthrie.  So I suppose it's a matter of digging 
around and seeing exactly how to use the hooks:

Hi Keith,

ASP.NET actually has pluggable language support even in V1.1.  It is
driven using the CodeDOM model, and can be configured in your
machine.config and web.config files.

Hope this helps,

Scott

-Original Message-
From: Keith J. Farmer [mailto:[EMAIL PROTECTED]  ]
Sent: Thursday, August 04, 2005 12:47 PM
To: Scott Guthrie
Subject: RE: Atlas -- CodeDOM? (via ScottGu's Blog)

Since you're there -- there was a question on the IronPython list about
using it to create aspx.  I'm pretty certain the language offerings in
1.1 were hardcoded:  is that still the case in 2.0, or is there a
build-provider-like registry of filetypes and language tags to
compilers?

<>___
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com