摘要: class oldboy: def __init__(self,bk): self.arg = bk self.name = 'alex' def func_1(self): print(self.arg) print(self.name) return True def func_2(s... 阅读全文
posted @ 2016-12-30 18:51 200ML 阅读(139) 评论(0) 推荐(0) 编辑
摘要: import pypy from lib.test(也就是文件路径) import py (文件名) r = __import__('lib.test.py(文件路径)',formlist = True(要声明才能找到)) ''' 反射根据用户输入寻找模块的东西''' inp = input('输入模块') inp_1 = __import__(inp) inp_2 = input('输入函数... 阅读全文
posted @ 2016-12-30 10:55 200ML 阅读(109) 评论(0) 推荐(0) 编辑