コード例 #1
0
def search():
    module_test.test()
    print ('in the search')
コード例 #2
0
def logger():
    test()
    print('in the logger')
コード例 #3
0
def logger():
    module_test.test()
コード例 #4
0
def search():
    test()
    print('in the search')
コード例 #5
0
#!/usr/bin/env Python
#-*- coding:utf-8 -*-
#Author:yanshen
#import module_test
from module_test import test
test()


def logger():
    test()
    print('in the logger')


def search():
    test()
    print('in the search')


logger()
search()
コード例 #6
0
# -*- coding:utf-8 -*-
__author__ = 'Qiushi Huang'
"""
程序目录:
    module_test.py
    index.py

当前文件:
    index.py
"""

import module_test as obj

obj.test()

print(hasattr(obj, 'test'))

getattr(obj, 'test')()
"""
from the test
True
from the test
"""
コード例 #7
0
def search():
    test()
    print("in the search")
コード例 #8
0
def logger():
    test()  # 调用module_test模块里面的函数
    print("in the logger")