当我用python 2.7.12 altinstall时
./configure --prefix =/opt/python --enable-shared
它出现为python 2.7.5(系统默认python)
但没有
--enable共享
它出现在2.7.12,我错过了什么?
这是RHEL 7.2
这不是一个路径问题:
没有--enable-shared
[root @myrig~]#/ opt/python/bin/python2.7 -V
Python 2.7.12
使用--enable-shared
[root @myrig~]#/ opt/python/bin/python2.7 -V
Python 2.7.5
I have a class with about 200 stub functions, they look something like this:
def name1(self, **kwargs):
return self.run('name-1', kwargs)
def name2(self, ** kwargs):
return self.run('name-2', kwargs)
Run Code Online (Sandbox Code Playgroud)
So on and so forth.
There is a run function that takes care of the real work.
I want to reduce the 200 stub function to just 1 dynamic function that gets called when you make a call to the class with a method name that doesn't exist.
How do I do this?