2006/11/29, Dino Viehland <[EMAIL PROTECTED]>:
> Is libxml2 a pyd? If so we currently don't support importing pyd's (it would
> require matching CPython's extension interface). Instead you might be able
> to use the .NET XML libraries as a work around.
Yes, Python binding of libxml2 is a C ext
Dino Viehland wrote:
> CreateParams is a property, so you'll need to construct a property to do this:
>
> class TransLabel(Label):
> def get_CreateParams(self):
> cp = super(TransLabel, self).CreateParams
> cp.ExStyle = cp.ExStyle | 20
> retu
CreateParams is a property, so you'll need to construct a property to do this:
class TransLabel(Label):
def get_CreateParams(self):
cp = super(TransLabel, self).CreateParams
cp.ExStyle = cp.ExStyle | 20
return cp
CreateParams = proper
The one workaround I am aware of is to write a base class in C# that has the
necessary attributes and then implement the rest in Python by deriving from
that class. If you need to have the base class call the derived class you can
add some protected abstract methods that the Python class would
Yes I agree any temporary workaround would be great...
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Wednesday, 29 November 2006 8:34 a.m.
To: Discussion of IronPython
Subject: Re: [IronPython] Help.. I need decorators
Dino Viehland
Hi,
In our system IP is used for many things including text templates in
similar fashion to what you describe. My implementation is basically
turning the whole template into Python function and then compiles it
using PythonEngine.CreateMethodUnscoped so it can be reused with
different argument
__getitem__ and __setitem__ can be implemented by implementing an indexer in
C#. These will automatically be transformed.
To implement __getattribute__ / __setattr__ you can implement ICustomAttributes
and intercept all attribute access. You'll need to fall back to the type to
get the default
Dino Viehland wrote:
> There's both the syntax issue and the implementation issue. The syntax issue
> is more obvious and we have candidates for classes and methods (e.g.
> something like __attributes__ = ... for classes, and decorators for methods -
> harder are attributes on the return type,
Is libxml2 a pyd? If so we currently don't support importing pyd's (it would
require matching CPython's extension interface). Instead you might be able to
use the .NET XML libraries as a work around.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mike
Thanks for the bug report!
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick O'Brien
Sent: Monday, November 20, 2006 4:36 PM
To: users@lists.ironpython.com
Subject: [IronPython] Class with slots and getattr not compatible
Ticket:
http://www.codeplex.com/WorkItem/View.aspx?Pr
Look into the "Tutorial" folder of the ironpython distribution.
There are examples in C# and in VB.Net.
If you know C# or any other .Net language, it's just a matter of
writing your classes and compile them as .dll.
Then you can create a "DLLs" directory into the same folder where your
ipy.exe is
Hi,
I'm trying to run a python script from c# using the executeFile
method.
The debugger seems to stop on an import statement (libxml2) :
import libxml2
I did used AddToPath to add the related modules.
Is there another way to tell the CLR where the imported modules are?
Am I missing something
Hi,
I'm trying to run python script from c# using the executeFile pe
method.
It's works to some extent ... that is if the script does not make any
local import such as:
import libxml2
Having this would crash on an import from the libxml2 script:
from libxmlmods import libml2
I didtry to p
Hi,
I'm trying to run a python script from c# using the executeFile
method.
The debugger seems to stop on an import statement (libxml2) :
import libxml2
I did used AddToPath to add the related modules.
Is there another way to tell the CLR where the imported modules are?
Am I missing something
Thank you for answer! I should to be more acurate.
How to implement in C# extension special methods:
__getitem__, __setitem__, __getattr__, __setattr__ and other special
methods?
Thanks.
___
users mailing list
users@lists.ironpython.com
http://lists.iro
Hi all,
I'd like to invoke python modules from C#.
I'm using the PythonEngine and ExecuteFile method but it looks like it
does not handle python imports correctly.
The python module I execute imports the famous libxml2.
It seems to crash on its initilisation:
from libxmlmods import libx
Hi,
New guy here.
I am developing a web application that uses the Front Controller pattern, the
idea was that it would provide rich functionality for mapping UI Elements to
business objects.
It came to the point where it would be nice to have content parts that I could
write up in a text f
There's both the syntax issue and the implementation issue. The syntax issue
is more obvious and we have candidates for classes and methods (e.g. something
like __attributes__ = ... for classes, and decorators for methods - harder are
attributes on the return type, on the parameters, on fields,
On 11/28/06, Dino Viehland <[EMAIL PROTECTED]> wrote:
This is the first request for this we've gotten and it hasn't really been
on our todo list. I've opened a bug (
http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=6011).
In the mean time I'd suggest using the stand
This is the first request for this we've gotten and it hasn't really been on
our todo list. I've opened a bug
(http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=6011).
In the mean time I'd suggest using the standard pickle module which ships w/
CPython - it appears
Dino Viehland wrote:
> This comes up on a semi-regular basis. We currently don't have any support
> for attributes. We've considered many ways to do this but likely won't have
> support until 2.0 at the earliest.
>
Can I ask what the difficulty with it is ? It surely isn't just a syntax
issue
Patrick O'Brien wrote:
> On 11/28/06, Blesson Varghese <[EMAIL PROTECTED]> wrote:
>>
>> I want to write code to provide Intellisense to an IDE for Iron
>> Python...Do we have any options within the Python Engine to do that???
>>
>> --
>>
>
> I'm not sure I'd have time t
This comes up on a semi-regular basis. We currently don't have any support for
attributes. We've considered many ways to do this but likely won't have
support until 2.0 at the earliest.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ivan Porto
Carrero
Sent: Monday, November 20
Still catching up on e-mail after last week (it was Thanksgiving here). Thanks
for reporting this and following up.
This is just a silly copy & paste error in ExceptionConverter.cs.
UnicodeErrorInit has the line:
Ops.SetAttr(DefaultContext.Default, self, SymbolTable.StringToId("@object"),
@o
On 11/28/06, Blesson Varghese <[EMAIL PROTECTED]> wrote:
I want to write code to provide Intellisense to an IDE for Iron
Python...Do we have any options within the Python Engine to do that???
--
I'm not sure I'd have time to do it, but I'm thinking about rewriting
Here's how I implement intellisense in Python. This is very easy for an
interactive command line, and a bit trickier for an editor. The code was
gleaned from an Idle implementation, and I haven't changed it in years. It
works fine with both CPython and IronPython, returning both the stdlib and
.
Have you looked at the code for tab completion?
Ipy.exe -X:TabCompletion
On the other hand, why not write it in Python? It works for me.
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Blesson Varghese
Sent: Tuesday, November 28, 2006 1:58 AM
To: users@lists.iro
27 matches
Mail list logo