mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Whitespace normalization. Ran reindent.py over the entire source tree.
This commit is contained in:
parent
4fba4521e8
commit
e6ddc8b20b
62 changed files with 5050 additions and 5061 deletions
|
@ -22,35 +22,35 @@ FINGER_PORT = 79
|
|||
# Output goes directly to stdout (although this can be changed).
|
||||
#
|
||||
def finger(host, args):
|
||||
s = socket(AF_INET, SOCK_STREAM)
|
||||
s.connect((host, FINGER_PORT))
|
||||
s.send(args + '\n')
|
||||
while 1:
|
||||
buf = s.recv(1024)
|
||||
if not buf: break
|
||||
sys.stdout.write(buf)
|
||||
sys.stdout.flush()
|
||||
s = socket(AF_INET, SOCK_STREAM)
|
||||
s.connect((host, FINGER_PORT))
|
||||
s.send(args + '\n')
|
||||
while 1:
|
||||
buf = s.recv(1024)
|
||||
if not buf: break
|
||||
sys.stdout.write(buf)
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
# Main function: argument parsing.
|
||||
#
|
||||
def main():
|
||||
options = ''
|
||||
i = 1
|
||||
while i < len(sys.argv) and sys.argv[i][:1] == '-':
|
||||
options = options + sys.argv[i] + ' '
|
||||
i = i+1
|
||||
args = sys.argv[i:]
|
||||
if not args:
|
||||
args = ['']
|
||||
for arg in args:
|
||||
if '@' in arg:
|
||||
at = string.index(arg, '@')
|
||||
host = arg[at+1:]
|
||||
arg = arg[:at]
|
||||
else:
|
||||
host = ''
|
||||
finger(host, options + arg)
|
||||
options = ''
|
||||
i = 1
|
||||
while i < len(sys.argv) and sys.argv[i][:1] == '-':
|
||||
options = options + sys.argv[i] + ' '
|
||||
i = i+1
|
||||
args = sys.argv[i:]
|
||||
if not args:
|
||||
args = ['']
|
||||
for arg in args:
|
||||
if '@' in arg:
|
||||
at = string.index(arg, '@')
|
||||
host = arg[at+1:]
|
||||
arg = arg[:at]
|
||||
else:
|
||||
host = ''
|
||||
finger(host, options + arg)
|
||||
|
||||
|
||||
# Call the main function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue