摘要: 1 # @Time : ${DATE} ${HOUR}:${MINUTE} 2 # @Author : xxx 3 # @Email : 1371063xxx@139.com 4 # @File : ${NAME}.py 5 # @Software: ${PRODUCT_NAME} # @Time 阅读全文
posted @ 2020-07-01 10:45 Fmaj-7 阅读(251) 评论(0) 推荐(0)
摘要: vim /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT= 阅读全文
posted @ 2020-06-30 09:17 Fmaj-7 阅读(103) 评论(0) 推荐(0)
摘要: 1 def _parse_known_args(self, arg_strings, namespace): 2 # replace arg strings that are file references 3 if self.fromfile_prefix_chars is not None: 4 阅读全文
posted @ 2020-06-24 11:49 Fmaj-7 阅读(211) 评论(0) 推荐(0)
摘要: 1 def load_command_class(app_name, name): 2 """ 3 Given a command name and an application name, returns the Command 4 class instance. All errors raise 阅读全文
posted @ 2020-06-24 09:59 Fmaj-7 阅读(321) 评论(0) 推荐(0)
摘要: Python callable() 函数 Python 内置函数 描述 callable() 函数用于检查一个对象是否是可调用的。如果返回 True,object 仍然可能调用失败;但如果返回 False,调用对象 object 绝对不会成功。 对于函数、方法、lambda 函式、 类以及实现了 _ 阅读全文
posted @ 2020-06-23 11:54 Fmaj-7 阅读(202) 评论(0) 推荐(0)
摘要: 1 class CommandParser(ArgumentParser): 2 """ 3 Customized ArgumentParser class to improve some error messages and prevent 4 SystemExit in several occa 阅读全文
posted @ 2020-06-23 09:11 Fmaj-7 阅读(169) 评论(0) 推荐(0)
摘要: Python any() 函数 Python 内置函数 描述 any() 函数用于判断给定的可迭代参数 iterable 是否全部为 False,则返回 False,如果有一个为 True,则返回 True。 元素除了是 0、空、FALSE 外都算 TRUE。 函数等价于: def any(iter 阅读全文
posted @ 2020-06-23 09:02 Fmaj-7 阅读(451) 评论(0) 推荐(0)
摘要: 1 dict1 = {'a': 1, 'b': 2, 'c': 3} 2 dict1.update({'d': 4, 'e': 5, 'c': 100}) 3 dict1.update({'c': 100}) #不会删除,只会增加或修改 4 print(dict1) 1 dict2 = {} 2 d 阅读全文
posted @ 2020-06-22 11:10 Fmaj-7 阅读(229) 评论(0) 推荐(0)
摘要: 1 @lru_cache.lru_cache(maxsize=None) 2 def get_commands(): 3 """ 4 Returns a dictionary mapping command names to their callback applications. 5 6 This 阅读全文
posted @ 2020-06-22 10:53 Fmaj-7 阅读(225) 评论(0) 推荐(0)
摘要: 1 def find_commands(management_dir): 2 """ 3 Given a path to a management directory, returns a list of all the command 4 names that are available. 5 6 阅读全文
posted @ 2020-06-22 09:53 Fmaj-7 阅读(253) 评论(0) 推荐(0)