| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent de0883d commit e8765f3
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,8 @@ | |||
| 19 | 19 | ||
| 20 | 20 | Notes: | |
| 21 | 21 | - Using a real file is often faster (but less convenient). | |
| 22 | + - There's also a much faster implementation in C, called cStringIO, but | ||
| 23 | + it's not subclassable. | ||
| 22 | 24 | - fileno() is left unimplemented so that code which uses it triggers | |
| 23 | 25 | an exception early. | |
| 24 | 26 | - Seeking far beyond EOF and then writing will insert real null | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -399,23 +399,22 @@ | |||
| 399 | 399 | - Don't try to give a CGI script a set-uid mode. This doesn't work on | |
| 400 | 400 | most systems, and is a security liability as well. | |
| 401 | 401 | ||
| 402 | - | ||
| 403 | - History | ||
| 404 | - ------- | ||
| 405 | - | ||
| 406 | - Michael McLay started this module. Steve Majewski changed the | ||
| 407 | - interface to SvFormContentDict and FormContentDict. The multipart | ||
| 408 | - parsing was inspired by code submitted by Andreas Paepcke. Guido van | ||
| 409 | - Rossum rewrote, reformatted and documented the module and is currently | ||
| 410 | - responsible for its maintenance. | ||
| 411 | - | ||
| 412 | - | ||
| 413 | - XXX The module is getting pretty heavy with all those docstrings. | ||
| 414 | - Perhaps there should be a slimmed version that doesn't contain all those | ||
| 415 | - backwards compatible and debugging classes and functions? | ||
| 416 | - | ||
| 417 | 402 | """ | |
| 418 | 403 | ||
| 404 | + # XXX The module is getting pretty heavy with all those docstrings. | ||
| 405 | + # Perhaps there should be a slimmed version that doesn't contain all those | ||
| 406 | + # backwards compatible and debugging classes and functions? | ||
| 407 | + | ||
| 408 | + # History | ||
| 409 | + # ------- | ||
| 410 | + # | ||
| 411 | + # Michael McLay started this module. Steve Majewski changed the | ||
| 412 | + # interface to SvFormContentDict and FormContentDict. The multipart | ||
| 413 | + # parsing was inspired by code submitted by Andreas Paepcke. Guido van | ||
| 414 | + # Rossum rewrote, reformatted and documented the module and is currently | ||
| 415 | + # responsible for its maintenance. | ||
| 416 | + # | ||
| 417 | + | ||
| 419 | 418 | __version__ = "2.2" | |
| 420 | 419 | ||
| 421 | 420 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,9 @@ | |||
| 1 | 1 | """Utilities needed to emulate Python's interactive interpreter. | |
| 2 | 2 | ||
| 3 | - Inspired by similar code by Jeff Epler and Fredrik Lundh. | ||
| 4 | 3 | """ | |
| 5 | 4 | ||
| 5 | + # Inspired by similar code by Jeff Epler and Fredrik Lundh. | ||
| 6 | + | ||
| 6 | 7 | ||
| 7 | 8 | import sys | |
| 8 | 9 | import string | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,11 +3,6 @@ | |||
| 3 | 3 | Based on RFC 959: File Transfer Protocol | |
| 4 | 4 | (FTP), by J. Postel and J. Reynolds | |
| 5 | 5 | ||
| 6 | - Changes and improvements suggested by Steve Majewski. | ||
| 7 | - Modified by Jack to work on the mac. | ||
| 8 | - Modified by Siebren to support docstrings and PASV. | ||
| 9 | - | ||
| 10 | - | ||
| 11 | 6 | Example: | |
| 12 | 7 | ||
| 13 | 8 | >>> from ftplib import FTP | |
@@ -34,6 +29,11 @@ | |||
| 34 | 29 | python ftplib.py -d localhost -l -p -l | |
| 35 | 30 | """ | |
| 36 | 31 | ||
| 32 | + # | ||
| 33 | + # Changes and improvements suggested by Steve Majewski. | ||
| 34 | + # Modified by Jack to work on the mac. | ||
| 35 | + # Modified by Siebren to support docstrings and PASV. | ||
| 36 | + # | ||
| 37 | 37 | ||
| 38 | 38 | import os | |
| 39 | 39 | import sys | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,10 +6,11 @@ | |||
| 6 | 6 | On Windows, the msvcrt module will be used. | |
| 7 | 7 | On the Mac EasyDialogs.AskPassword is used, if available. | |
| 8 | 8 | ||
| 9 | - Authors: Piers Lauder (original) | ||
| 10 | - Guido van Rossum (Windows support and cleanup) | ||
| 11 | 9 | """ | |
| 12 | 10 | ||
| 11 | + # Authors: Piers Lauder (original) | ||
| 12 | + # Guido van Rossum (Windows support and cleanup) | ||
| 13 | + | ||
| 13 | 14 | import sys | |
| 14 | 15 | ||
| 15 | 16 | def unix_getpass(prompt='Password: '): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,10 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | 4 | Based on RFC 2060. | |
| 5 | 5 | ||
| 6 | - Author: Piers Lauder <piers@cs.su.oz.au> December 1997. | ||
| 7 | - | ||
| 8 | - Authentication code contributed by Donn Cave <donn@u.washington.edu> June 1998. | ||
| 9 | - | ||
| 10 | 6 | Public class: IMAP4 | |
| 11 | 7 | Public variable: Debug | |
| 12 | 8 | Public functions: Internaldate2tuple | |
@@ -15,6 +11,10 @@ | |||
| 15 | 11 | Time2Internaldate | |
| 16 | 12 | """ | |
| 17 | 13 | ||
| 14 | + # Author: Piers Lauder <piers@cs.su.oz.au> December 1997. | ||
| 15 | + # | ||
| 16 | + # Authentication code contributed by Donn Cave <donn@u.washington.edu> June 1998. | ||
| 17 | + | ||
| 18 | 18 | __version__ = "2.32" | |
| 19 | 19 | ||
| 20 | 20 | import binascii, re, socket, string, time, random, sys | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,12 @@ | |||
| 1 | 1 | """A POP3 client class. | |
| 2 | 2 | ||
| 3 | 3 | Based on the J. Myers POP3 draft, Jan. 96 | |
| 4 | - | ||
| 5 | - Author: David Ascher <david_ascher@brown.edu> | ||
| 6 | - [heavily stealing from nntplib.py] | ||
| 7 | - Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97] | ||
| 8 | 4 | """ | |
| 9 | 5 | ||
| 6 | + # Author: David Ascher <david_ascher@brown.edu> | ||
| 7 | + # [heavily stealing from nntplib.py] | ||
| 8 | + # Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97] | ||
| 9 | + | ||
| 10 | 10 | # Example (see the test function at the end of this file) | |
| 11 | 11 | ||
| 12 | 12 | TESTSERVER = "localhost" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,14 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | 3 | """SMTP/ESMTP client class. | |
| 4 | 4 | ||
| 5 | - Author: The Dragon De Monsyne <dragondm@integral.org> | ||
| 6 | - ESMTP support, test code and doc fixes added by | ||
| 7 | - Eric S. Raymond <esr@thyrsus.com> | ||
| 8 | - Better RFC 821 compliance (MAIL and RCPT, and CRLF in data) | ||
| 9 | - by Carey Evans <c.evans@clear.net.nz>, for picky mail servers. | ||
| 10 | - | ||
| 11 | - This was modified from the Python 1.5 library HTTP lib. | ||
| 12 | - | ||
| 13 | 5 | This should follow RFC 821 (SMTP) and RFC 1869 (ESMTP). | |
| 14 | 6 | ||
| 15 | 7 | Notes: | |
@@ -39,6 +31,14 @@ | |||
| 39 | 31 | >>> s.quit() | |
| 40 | 32 | """ | |
| 41 | 33 | ||
| 34 | + # Author: The Dragon De Monsyne <dragondm@integral.org> | ||
| 35 | + # ESMTP support, test code and doc fixes added by | ||
| 36 | + # Eric S. Raymond <esr@thyrsus.com> | ||
| 37 | + # Better RFC 821 compliance (MAIL and RCPT, and CRLF in data) | ||
| 38 | + # by Carey Evans <c.evans@clear.net.nz>, for picky mail servers. | ||
| 39 | + # | ||
| 40 | + # This was modified from the Python 1.5 library HTTP lib. | ||
| 41 | + | ||
| 42 | 42 | import socket | |
| 43 | 43 | import string | |
| 44 | 44 | import re | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,10 +25,6 @@ | |||
| 25 | 25 | random generators, and to choose from other ranges. | |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | - Translated by Guido van Rossum from C source provided by | ||
| 29 | - Adrian Baddeley. | ||
| 30 | - | ||
| 31 | - | ||
| 32 | 28 | ||
| 33 | 29 | Multi-threading note: the random number generator used here is not | |
| 34 | 30 | thread-safe; it is possible that nearly simultaneous calls in | |
@@ -37,6 +33,10 @@ | |||
| 37 | 33 | down in the serial case by using a lock here.) | |
| 38 | 34 | """ | |
| 39 | 35 | ||
| 36 | + # Translated by Guido van Rossum from C source provided by | ||
| 37 | + # Adrian Baddeley. | ||
| 38 | + | ||
| 39 | + | ||
| 40 | 40 | class whrandom: | |
| 41 | 41 | def __init__(self, x = 0, y = 0, z = 0): | |
| 42 | 42 | """Initialize an instance. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments