[IronPython] Static methods

2006-09-25 Thread David Anton
Which of the following is considered more acceptable in the Python/IronPython community? Prefacing the method with: @staticmethod or following the method with: MyMethod = staticmethod(MyMethod) -- View this message in context: http://www.nabble.com/Static-methods-tf2327398.html#a6474908 Sent

[IronPython] Simulating namespaces

2006-09-25 Thread David Anton
Is this an acceptable way to simulate the type of namespace you'd define in C#, VB, etc? class SimulatedNamespace: class SomeClass(object): It seems to work ok in my tests, but is there some pitfall to doing this? -- View this message in context: http://www.nabble.com/Simulat

Re: [IronPython] Arrays in IronPython

2006-09-25 Thread David Anton
by hand: > > x[0,1,2] = 2 > > > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of David Anton > Sent: Wednesday, September 20, 2006 8:15 AM > To: users@lists.ironpython.com > Subject: [IronPython] Arrays in IronPython > > >

[IronPython] Calling external API from IronPython

2006-09-22 Thread David Anton
Is there a way to declare external API functions (non-assembly based) called from Python code? e.g., in VB, you'd do something like declare the following stub: Private Declare Function FriendlyName Lib "kernel32" Alias "ActualAPIFunctionName"(ByVal SomeString As String) As Integer e.g., in C#, y

[IronPython] Arrays in IronPython

2006-09-22 Thread David Anton
After a lot of googling on this, I'm still confused about .NET arrays (not Python lists) in IronPython. One dimensional arrays are clear: foo = Array[int] ((1,2)) But how to set up jagged arrays and multidimensional arrays? I know that IronPython is happy with the following (i.e., no error), but

[IronPython] IronPyton newbie questions

2006-09-12 Thread David Anton
I'm new to IronPyton (and Python in general). Where can I find a good reference or spec for IronPython? I'd like to find information on whether the following is available in IronPython (google has been of limited help so far in the following searches): - conditional compilation - attributes (e.g.