| | |
| | | import datetime
|
| | | import subprocess
|
| | | import binascii
|
| | | import inspect
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | |
|
| | |
| | | # 由于float会有不精确的现象出现xxx.9999999或xxx.0000000000001的问题,所以这里计算出的结果向上取整
|
| | | return int(math.ceil(round(floatRMB * rate)))
|
| | |
|
| | | def get_class_method(cls, startswith=""):
|
| | | ## 获取类中的所有方法
|
| | | methods = []
|
| | | members = inspect.getmembers(cls)
|
| | | for member_name, member in members:
|
| | | if startswith and not member_name.startswith(startswith):
|
| | | continue
|
| | | if inspect.ismethod(member):
|
| | | methods.append(member_name)
|
| | | return methods
|