Home » Programming Languages

Hereby we shall try to understand a very basic program to send mail using python library smtplib

The smtplib in python defines a client object that can be used to send mail to any internet machine a SMTP listener daemon.

 

1. Create an SMTP object.

import smtplib

smtpObj=smtplib.SMTP(host,portNo);

Note that host or port number are optional.

host: the server where SMTP is running. example: smtp.gmail.com

port number: the port number where SMTP server is listening.

 

... Read more »

Category: Programming Languages | Views: 465 | Added by: shanky | Date: 2017-08-22 | Comments (0)

Hi Guys,

Today in this article we shall build up a small program to understand client -server communication using socket in Python.


 

Server side:

1. Create a socket:

socket(socket family, type(TCP/UDP), protocol)

-- Family or domain could be AF_INET or AF_UNIX

-- Type could be TCP: SOCK_STREAM or UDP : SOCK_DGRAM

-- Protocol is left bank, by default it is 0.

 

2. Bind socket

socket.bind(IPaddress, portNo)

-- bind the socket to a system's ip address and port ... Read more »

Category: Programming Languages | Views: 681 | Added by: shanky | Date: 2017-08-19 | Comments (0)

Hello Guys

If you want to create a simple downloader or you want to learn the concept of background worker and progress bar , you must go through this basic article.

Here we are using a very simple example that will help you to understand these concepts. So we shall go steps by step.


  • First of all add a button to your Form to start download, a progress bar to show download progress and a background worker for background processing of download. A cancel download button is additional.

bw1

 

 

  • Set the following properties of background worker: Put below code on the load event of form or t ... Read more »
Category: Programming Languages | Views: 1473 | Added by: shanky | Date: 2015-09-15 | Comments (0)