# -*- coding:utf-8 -*-
import sys
import os
class test_class():
def hello(self):
print(sys._getframe().f_code.co_name)
def hello_world():
print('hello_world!')
print(sys._getframe().f_code.co_name)
if __name__ == '__main__':
ttt = test_class()
ttt.hello()
hello_world()
print(os.path.basename(sys.argv[0]))
print(os.path.basename(sys.argv[0]).split(".")[0])
hello
hello_world!
hello_world
test.py
test
Process finished with exit code 0