Python is a programming language that is especially useful for solving problems on a high level. It is very readable, diverse and comes with a lot of functionality built in. If this is not enough, there are 172.096 external modules that you can use in your project. This makes Python a great tool for developers that don’t want to invent the wheel over and over again. Also, as an established programming language, it doesn’t have as many overhauls as some more modern languages. This means that we don’t have to adapt our projects to new standards all the time and can stay focussed on creating solutions for actual problems.
import xml.etree.ElementTree as ET
document = ET.Element('document')
node = ET.SubElement(document, 'hello')
node.text = 'world'
ET.dump(document)
from http.server import BaseHTTPRequestHandler, HTTPStatus
import socketserver
server_address = ('127.0.0.1', 8001)
class HelloWorldHandler(BaseHTTPRequestHandler):
byte_encoding = 'UTF-8'
hello_world_bytes = 'Hello World!\\n'.encode(
byte_encoding)
def do_GET(self):
self.send_response(HTTPStatus.OK)
self.send_header(
"Content-type", 'text/plain; charset={}'
.format(self.byte_encoding))
self.end_headers()
self.wfile.write(self.hello_world_bytes)
print('serving at port {}'.format(server_address[1]))
server = socketserver.TCPServer(
server_address,
HelloWorldHandler)
server.serve_forever()
print('Hello world!')
import socket
hello_world_bytes = 'Hello World!\\n'.encode('UTF-8')
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.sendto(hello_world_bytes, ('127.0.0.1', 4242))
sock.close()
from PIL import Image, ImageDraw
image_size = (200, 50)
image = Image.new('RGB', image_size, color='green')
drawable = ImageDraw.Draw(image)
drawable.text((10, 10), 'Hello World!')
image.show()
Python is one of the most popular languages in the world. Many of the Fortune 500 companies use Python to support their processes.
You can always contact us. First, we serve as a guide to support your success with information technology. Then we craft top-grade software that helps your company continue to perform.
Contact us