]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / scripts / from.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py
deleted file mode 100644 (file)
index c7fcb9f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env python\r
-\r
-# Print From and Subject of messages in $MAIL.\r
-# Extension to multiple mailboxes and other bells & whistles are left\r
-# as exercises for the reader.\r
-\r
-import sys, os\r
-\r
-# Open mailbox file.  Exits with exception when this fails.\r
-\r
-try:\r
-    mailbox = os.environ['MAIL']\r
-except (AttributeError, KeyError):\r
-    sys.stderr.write('No environment variable $MAIL\n')\r
-    sys.exit(2)\r
-\r
-try:\r
-    mail = open(mailbox)\r
-except IOError:\r
-    sys.exit('Cannot open mailbox file: ' + mailbox)\r
-\r
-while 1:\r
-    line = mail.readline()\r
-    if not line:\r
-        break # EOF\r
-    if line.startswith('From '):\r
-        # Start of message found\r
-        print line[:-1],\r
-        while 1:\r
-            line = mail.readline()\r
-            if not line or line == '\n':\r
-                break\r
-            if line.startswith('Subject: '):\r
-                print repr(line[9:-1]),\r
-        print\r