Sockets in Python
Python programming has built-in libraries for TCP Sockets. So, it makes life easier. Syntax: import socket objSocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM ); encode() method can be used to encode when ....
Python programming has built-in libraries for TCP Sockets. So, it makes life easier. Syntax: import socket objSocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM ); encode() method can be used to encode when ....
Regular Expressions in Python make life easier in programming. "import re" should be used to use regular expressions in Python. re.findall() and re.search() are used. import re should be used ....
Tuples in Python are similar to list data type. It makes use of ( and ). List uses [ and ]. The significant difference is, once we create the Tuples, ....
RegEx(Regular Expression) can be used to get URL without path in Python. Sample Code: import re serverUrl = 'https://infallibletechie.my.salesforce.com/services/Soap/c/29.0/00Di0000000icUB/0DFi00000008UYO'; strURL = re.findall( "(https://.*?)/", serverUrl )[ 0 ]; print( 'strURL is', strURL ....
RegEx(Regular Expression) can be used to parse to parse Salesforce Login SOAP Response in Python. Sample Code: import re strXMLString = '''<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <loginResponse> ....
Dictionaries in Python are used for data collection. They are similar to map data type in other programming languages where we use key and value pairs. dict(): dict() is used ....
A collection or list allows us to store multiple values in a variable. for and in statements can be used to iterate a list in Python programming. Example: fruits = ....
open() and read() methods play a vital role in handling files in Python. open(): open() method is used to read and write files. Syntax: open( filename, mode ); modes are ....
while loop: While loop executes repeatedly the block of code until the condition becomes false. Sample Code: strNumber = input( 'Please Enter a Number' ); intNumber = int( strNumber ); ....
Functions are used to store and reuse code. def statement is used to define the Functions. Built-In or Pre-defined Functions: max, min, print, input, float, int, etc. are Built-In Python ....