473,809 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interfaces and abstract class

440 Contributor
Hi,

Could anybody help me,whether we have interface and abstract class concepts available in Python.

If so,could you please provide me a sample piece of code for client and server side

Interface{

Method1()=0;
........
}

Class X(Interfaace){
Method1()
{
}

}

How to invoke this interfaces using Client and server interaction.

Currently Iam developing the application using Python.

Python GUI(client)->application(cl ient).In future,I have to expose only interfaces ,so that I can use this interfaces to query the implementation locatedvin server side

The above example solution will really helps me.I will really appreciate if anybody help me in suggesting the solution.

Thanks in advance
PSB
Thanks in advance
PSB
Feb 25 '07 #1
3 2422
bartonc
6,596 Recognized Expert Expert
Hi,

Could anybody help me,whether we have interface and abstract class concepts available in Python.

If so,could you please provide me a sample piece of code for client and server side

Interface{

Method1()=0;
........
}

Class X(Interfaace){
Method1()
{
}

}

How to invoke this interfaces using Client and server interaction.

Currently Iam developing the application using Python.

Python GUI(client)->application(cl ient).In future,I have to expose only interfaces ,so that I can use this interfaces to query the implementation locatedvin server side

The above example solution will really helps me.I will really appreciate if anybody help me in suggesting the solution.

Thanks in advance
PSB
Thanks in advance
PSB
Abstract classed (no code implementation) : Yes.
Interface declarations: No.
Feb 26 '07 #2
psbasha
440 Contributor
Abstract classed (no code implementation) : Yes.
Interface declarations: No.
Hi ,

We dont have sample code for the Interface and Abstract classes.Could you please help me for the links to understand the implementation of this using Python.

Thanks in advance
PSB
Feb 26 '07 #3
bartonc
6,596 Recognized Expert Expert
Hi ,

We dont have sample code for the Interface and Abstract classes.Could you please help me for the links to understand the implementation of this using Python.

Thanks in advance
PSB
Python Tutorial 9. Classes
Feb 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2267
by: Vishal Gandhi | last post by:
Hi , Please help me by advising an real life scenario where Abstract Classes should be used over Interfaces or vice versa . Whats the basic difference between Abstract Class and interface other then instantiation ? Many Thanks Vishal Gandhi
12
1551
by: Peter N Roth | last post by:
If i build a class in C#, i can declare a method abstract. If someone derives from this class, the abstract method must be overriden for the computation to succeed. ISTM that an Interface provides a similar service, i.e., all methods must be implemented in order for the computation to succeed. Why use one or the other? Or maybe both? Is it because interfaces can be implemented in _any_
10
267
by: Michael Grimsley | last post by:
I have been looking at interfaces in C# and cannot seem to understand them. I am told that interfaces resembles a class with no code and that methods declared in an interface are not allowed to contain method bodies. My question is what purpose does creating an interface serve that has methods with not bodies? If a method does not have a body then what is the methods purpose, because if you call the method it will not do anything or you have to...
17
2361
by: Picho | last post by:
Hi all, I popped up this question a while ago, and I thought it was worth checking again now... (maybe something has changed or something will change). I read this book about component oriented design (owreilly - Juval Lowy), and it was actually very nice. The book goes on about how we should use Interfaces exposure instead of classes (this is my terminology and english is not my language so I hope you understand what I'm on about...).
30
2518
by: Frank Rizzo | last post by:
We are having one of those religious debates at work: Interfaces vs Classes. My take is that Classes give you more flexibility. You can enforce a contract on the descendant classes by marking methods abstract (which is all that an interface does). In addition, the classes allow you to be flexible by adding functionality that child classes inherit. Or by providing optional functionality via virtual methods. Now, I understand that...
5
3678
by: Michael McCarthy | last post by:
I want to develop plugin support for a system.montitor module I am working on. A lot of the modules will do mostly interop stuff for an older system, but I want to use it myself as well to monitor event logs and other things as I think of them... I've seen two ways of doing this, the abstract class factory, or the interface... the module logic is fairly simple, watch something -> get the result -> notify / fix / and or log it... I've...
9
5202
by: Sean Kirkpatrick | last post by:
To my eye, there doesn't seem to be a whole lot of difference between the two of them from a functional point of view. Can someone give me a good explanation of why one vs the other? Sean
6
1700
by: Steve | last post by:
I am designing a new class hierarchy and I've already run into a bit of a bump in the road. I have this structure so far; class CodeGen class CodeGenHeader : CodeGen class CodeGenProtocolHeader : CodeGenHeader CodeGen is not an entirely abstract class, there are properties like FileName, Date, etc that are shared with all class', however there are other members that although they are shared with all the derived classes, need to
18
1779
by: abcd | last post by:
Can someone tell me whats the exact advantage of Interfaces in C#. To me abstract classes serves the purpose and have all good things then what is special about interfaces...can someone tell me some real example from system, user, developer point of view....
5
3019
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I am actually a VB.Net guy, but I have worked somewhat with C++ and C#. I just want to ask about the relationship between Abstract Classes and Interfaces. My first question is if C# even has Iinterfaces. I took some Java programming classes and Interfaces are a main staple of Java. And in VB.Net I use interfaces for setting up definitions of classes. I am guessing that Abstract classes in C# do the same thing as...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.