]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / sockets / finger.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py
deleted file mode 100644 (file)
index 9cd854c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/env python\r
-\r
-# Python interface to the Internet finger daemon.\r
-#\r
-# Usage: finger [options] [user][@host] ...\r
-#\r
-# If no host is given, the finger daemon on the local host is contacted.\r
-# Options are passed uninterpreted to the finger daemon!\r
-\r
-\r
-import sys, string\r
-from socket import *\r
-\r
-\r
-# Hardcode the number of the finger port here.\r
-# It's not likely to change soon...\r
-#\r
-FINGER_PORT = 79\r
-\r
-\r
-# Function to do one remote finger invocation.\r
-# Output goes directly to stdout (although this can be changed).\r
-#\r
-def finger(host, args):\r
-    s = socket(AF_INET, SOCK_STREAM)\r
-    s.connect((host, FINGER_PORT))\r
-    s.send(args + '\n')\r
-    while 1:\r
-        buf = s.recv(1024)\r
-        if not buf: break\r
-        sys.stdout.write(buf)\r
-    sys.stdout.flush()\r
-\r
-\r
-# Main function: argument parsing.\r
-#\r
-def main():\r
-    options = ''\r
-    i = 1\r
-    while i < len(sys.argv) and sys.argv[i][:1] == '-':\r
-        options = options + sys.argv[i] + ' '\r
-        i = i+1\r
-    args = sys.argv[i:]\r
-    if not args:\r
-        args = ['']\r
-    for arg in args:\r
-        if '@' in arg:\r
-            at = string.index(arg, '@')\r
-            host = arg[at+1:]\r
-            arg = arg[:at]\r
-        else:\r
-            host = ''\r
-        finger(host, options + arg)\r
-\r
-\r
-# Call the main function.\r
-#\r
-main()\r