1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- __title__ = '测试读取ini文件'
- @Time : 2020/9/26 18:36
- @Author : Kenny-PC
- @Software: PyCharm
- # code is far away from bugs with the god animal protecting
- I love animals. They taste delicious.
- ┏┓ ┏┓
- ┏┛┻━━━┛┻┓
- ┃ ☃ ┃
- ┃ ┳┛ ┗┳ ┃
- ┃ ┻ ┃
- ┗━┓ ┏━┛
- ┃ ┗━━━┓
- ┃ 神兽保佑 ┣┓
- ┃ 永无BUG! ┏┛
- ┗┓┓┏━┳┓┏┛
- ┃┫┫ ┃┫┫
- ┗┻┛ ┗┻┛
- """
- import configparser
- import math
- import os
- # 获取当前文件所在目录的上一级目录
- # parent_dir_path = os.path.dirname(os.path.abspath('../..'))
- # config_path = parent_dir_path + '/conf/account_list_config.ini'
- #
- # # 读取数据库配置信息
- # config = configparser.ConfigParser(allow_no_value=True) #注意参数不能省
- # config.read(config_path, encoding='UTF-8')
- #
- # print(config.items("IPS"))
- # print(type(config.items("IPS")))
- # print(10 // int(1000) + 1)
- # print(1000 // int(1000) + 1)
- # print(1001 // int(1000) + 1)
- per_page = 1000
- total_count = 40
- page = 1
- # print(math.ceil(0 / int(per_page)))
- print(math.ceil(40 / int(per_page)))
- print(math.ceil(1000 / int(per_page)))
- parameter = int(page) > math.ceil(total_count / int(per_page))
- print(parameter)
- print(math.ceil(0 / 100))
- print(math.ceil(100 / 100))
- print(math.ceil(101 / 100))
- for i in range(5):
- if 1 != 1:
- items = [0,1]
- else:
- print('掌中云本次请求数据为空')
- items = []
- continue
- print('123345')
- for item in items:
- print(item)
|