Module Import alias alias alias alias ImportFrom alias alias FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Print Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareNotIn Str NameLoad body Assign NameStore Str Assign NameStore NameLoad orelse Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num If UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad Call NameLoad NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Num Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad AugAssignSub AttributeStore NameLoad attr Num If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr ImportFrom alias Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Print BinOpMod Str TupleLoad NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Print Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call NameLoad NameLoad ImportFrom alias For NameStore NameLoad body Assign TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Print BinOpMod Str TupleLoad Call NameLoad NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A datetime optparse os traceback twisted.internet.protocol Protocol ClientFactory parse_args N/A N/A N/A N/A N/A usage usage: %prog [options] [hostname]:port ...

This is the Get Poetry Now! client, Twisted version 2.0, with stacktrace.
Run it like this:

  python get-poetry-stack.py port1 port2 port3 ...

If you are in the base directory of the twisted-intro package,
you could run it like this:

  python twisted-client-2/get-poetry-stack.py 10001 10002 10003

But it's just going to print out a stacktrace as soon as it
gets the first bits of a poem.
 N/A parser N/A N/A optparse OptionParser usage N/A N/A _ addresses N/A N/A parser parse_args N/A N/A addresses N/A N/A N/A N/A parser format_help N/A N/A N/A parser exit parse_address N/A N/A addr N/A N/A N/A N/A : addr N/A N/A host 127.0.0.1 N/A port addr N/A N/A N/A host port N/A N/A addr split : 1 N/A N/A N/A N/A port isdigit N/A N/A N/A N/A parser error Ports must be integers. N/A N/A host N/A int port N/A N/A N/A map parse_address addresses N/A PoetryProtocol N/A Protocol N/A N/A poem N/A task_num 0 dataReceived N/A N/A self data N/A N/A N/A N/A N/A traceback print_stack N/A N/A N/A os _exit 0 N/A connectionLost N/A N/A self reason N/A N/A N/A N/A N/A self poemReceived N/A self poem N/A poemReceived N/A N/A self poem N/A N/A N/A N/A N/A N/A self factory poem_finished N/A self task_num poem N/A N/A PoetryClientFactory N/A ClientFactory N/A N/A task_num 1 N/A protocol PoetryProtocol __init__ N/A N/A self poetry_count N/A N/A N/A N/A self poetry_count poetry_count N/A N/A self poems N/A N/A buildProtocol N/A N/A self address N/A N/A N/A proto N/A N/A ClientFactory buildProtocol self address N/A N/A proto task_num N/A self task_num N/A N/A self task_num 1 N/A proto N/A poem_finished N/A N/A self task_num poem N/A None None N/A N/A N/A task_num None N/A N/A N/A N/A self poems N/A task_num poem N/A N/A self poetry_count 1 N/A N/A N/A self poetry_count 0 N/A N/A N/A N/A self report twisted.internet reactor N/A N/A N/A reactor stop N/A report N/A N/A self N/A N/A N/A i N/A self poems N/A N/A N/A Task %d: %d bytes of poetry N/A i N/A len N/A N/A self poems N/A i N/A clientConnectionFailed N/A N/A self connector reason N/A N/A N/A Failed to connect to: N/A N/A connector getDestination N/A N/A N/A self poem_finished N/A N/A poetry_main N/A N/A N/A N/A N/A addresses N/A parse_args N/A start N/A N/A N/A datetime datetime now N/A factory N/A PoetryClientFactory N/A len addresses twisted.internet reactor N/A address addresses N/A N/A N/A host port address N/A N/A N/A reactor connectTCP host port factory N/A N/A N/A reactor run N/A elapsed N/A N/A N/A N/A datetime datetime now start N/A N/A Got %d poems in %s N/A N/A len addresses elapsed N/A N/A N/A __name__ __main__ N/A N/A N/A poetry_main