Python Tips & tricks

xiaoxiao2021-03-05  47

Useful resources:

python cook bookdive into pythonpython liabrary manualpython turtorialpython python conferrence paperIBM- cute python series python Editorsdownload python books Woodpecker community Debugging in python Debugger commandsTips & Tricks:

get the ip address of localhost: socket.gethostbyname (socket.gethostname ()) using module 'cmd' to build intercative application: import cmdclass Interactive (cmd.Cmd): def __init __ (self): cmd.Cmd .__ init __ (self) Self.prompt = '%' DEF HELP_TEST (Self): Print 'you have type type /' test / 'command' DEF DO_TEST (Self, Arg): Print 'now procceeding your /' Test / 'Command.' Print 'Your arguments are: ', arg def do_EOF (self, arg): return Trueif __name__ ==' __main__ ': term = Interactive () term.cmdloop () you can lookup python standard library for detailsothers to be addedothers to be added

转载请注明原文地址:https://www.9cbs.com/read-31965.html

New Post(0)