Network Scripting

Devcult - 6G and Satellites
2 min readMay 6, 2019

Jython: Scripting Java web applications using Python. A system that compiles Python programs to Java bytecode, exports Java libraries for use in Python scripts and allows Python code to serve as web applets downloaded and run in a browser.

Google App Engine, Django and TurboGears are tools for constructing websites

IronPython implementation provides .NET integration.

A machine named localhost usually means the local computer itself. This allows to test both the client and the server sides of a dialog on the same computer without connecting to the Net. For eg, it’s possible to run both socket-based clients and servers locally on a PC without ever going out to the Net.

Python Internet Development Options

Networking tools: Socket, select and socketserver modules

Client-side protocol tools: FTP, email, HTTP, TElnet

Server-side CGI scripting: CGI scripting is an application model for running scripts on servers to process form data, take actions based upon it and produce reply pages.

Web frameworks and clouds: Frameworks can automate many of the low-level details and provide more structured and powerful techniques for dynamic site implementation.

Rich Internet Applications: Allows user interfaces implemented in web browsers to be much more dynamic and functional than HTML.

Web services: XML-RPC, SOAP

COBRA ORBS: COBRA is an architecture for distributed programming, in which components communicate across a network by routing calls through an Object Request Broker(ORB).

Screen scraping: XML and HTML parsing tools

The internet layers

  1. The socket layer

Sockets are programmable interface to connections between programs running on different computers of a network. They allow data formatted as byte strings to be passed between processes and machines.

Sockets are the portals through which programs send and receive bytes during a conversation.

Sockets can allow

a. communication between different computers

b. communication between different programs running on the same computer

Sockets are bidirectional data streams.

2. The protocol layer

Protocols run on top of sockets. They standardize message formats and socket port numbers.

Message formats provide structure for the bytes exchanged over sockets during conversations.

Port numbers are reserved numeric identifiers for socket.

Socket port numbers can have values between 0 to 65535.

Port numbers in the range of 0 to 1023 are assigned to the standard higher level protocols( off-limit to the scripts we write).

Servers and clients

Server: A machine that hosts websites. It runs a web server program that constantly listens for incoming connection requests on port 80.

Clients: Any script can open a client-side connection on port 80 to fetch web pages from the server.

Python’s Internet Library Modules

ftplib- Manages all the socket and message-level handshaking implied by the FTP protocol.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Devcult - 6G and Satellites
Devcult - 6G and Satellites

No responses yet

Write a response