Re: Interface & Implementation

2008-12-16 Thread Gabriel Genellina
En Fri, 12 Dec 2008 19:48:09 -0200, Lie Ryan escribió: but if you really want it, simple inheritance might be better anyway, though not really pythonic: class MyIfc(object): def myMeth1(self): return NotImplemented def myMeth2(self): return NotImplemented class MyClass(MyIfc): def

Re: Interface & Implementation

2008-12-12 Thread Lie Ryan
On Fri, 12 Dec 2008 16:07:26 +0530, J Ramesh Kumar wrote: > Hi, > > I am new to python. I require some help on implementing interface and > its implementation. I could not find any sample code in the web. Can you > please send me some sample code which is similar to the below java code > ? Thanks

Re: Interface & Implementation

2008-12-12 Thread rdmurray
On Fri, 12 Dec 2008 at 16:07, J Ramesh Kumar wrote: I am new to python. I require some help on implementing interface and its implementation. I could not find any sample code in the web. Can you please send me some sample code which is similar to the below java code ? Thanks in advance for your h

Interface & Implementation

2008-12-12 Thread J Ramesh Kumar
Hi, I am new to python. I require some help on implementing interface and its implementation. I could not find any sample code in the web. Can you please send me some sample code which is similar to the below java code ? Thanks in advance for your help. public interface MyIfc {

Re: Interface Implementation in Python

2007-03-06 Thread MonkeeSage
On Mar 6, 6:23 pm, [EMAIL PROTECTED] wrote: > I dont want to expose the above Point3D implementation to the user / > client side.To achieve that we can use interface concept.In Python to > use interface concept. In python you would use name mangling to hide parts of the interface from the public.

Re: Interface Implementation in Python

2007-03-06 Thread p_shakil
On Mar 6, 11:55 am, "Goldfish" <[EMAIL PROTECTED]> wrote: > > > I would like to know the interface concept in Python.How the > > > Interface is defined and implemented in Python?. > > One way I have implemented interfaces, is as follows: > > class MyInterface(object): > def someMethod(self, ar

Re: Interface Implementation in Python

2007-03-06 Thread Goldfish
> > I would like to know the interface concept in Python.How the > > Interface is defined and implemented in Python?. One way I have implemented interfaces, is as follows: class MyInterface(object): def someMethod(self, argument): raise NotImplementedError() If anybody ever uses tha

Re: Interface Implementation in Python

2007-03-06 Thread BJörn Lindqvist
On 5 Mar 2007 16:25:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? You have a class with methods and data. You write many

Re: Interface Implementation in Python

2007-03-06 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? > > Thanks > PSB > You might want to look at how Zope 3 implements interfaces. http://wiki.zope.org/

Re: Interface Implementation in Python

2007-03-06 Thread Johannes Woolard
'Lo, I think I know what you're asking: > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. I assume you're talking about the what Java calls an interface - and the simple answer is that we don't have an equivalent in Python. This is

Re: Interface Implementation in Python

2007-03-05 Thread MonkeeSage
On Mar 5, 6:25 pm, [EMAIL PROTECTED] wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? > > Thanks > PSB Not sure exactly what you mean, but in python (like most dynamic lan

Interface Implementation in Python

2007-03-05 Thread p_shakil
Hi, I would like to know the interface concept in Python.How the Interface is defined and implemented in Python?. How to access the interface fromn Client? Thanks PSB -- http://mail.python.org/mailman/listinfo/python-list

win32com interface implementation example

2005-05-17 Thread kenchanningphd
Can someone post or point me to a fairly simple example where a COM interface (other than the standard ones already exposed by the win32com library) is implemented in python. I fear I am doing it incorrectly. Here is my example: Suppose there is a COM interface "FOO" loaded in the windows registr