first commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import configparser
|
||||
import time
|
||||
|
||||
|
||||
def config_read():
|
||||
# 读取
|
||||
config = configparser.ConfigParser()
|
||||
config.read('config.ini')
|
||||
|
||||
mesg = config['video_path']['rtmp']
|
||||
data = mesg.split(',')
|
||||
def test1_1():
|
||||
# 读取
|
||||
config = configparser.ConfigParser()
|
||||
config.read('config.ini')
|
||||
|
||||
num1 = config['que']['num']
|
||||
name = config['que']['name']
|
||||
# test_n = int(num)
|
||||
print(type(int(num1)))
|
||||
num2 = int(num1)
|
||||
if num2 == 0:
|
||||
print("ok")
|
||||
config.set('que', 'num1', "1")
|
||||
config.write(open("config.ini", "w"))
|
||||
time.sleep(10)
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read('config.ini')
|
||||
num = config['que']['num']
|
||||
name = config['que']['name']
|
||||
print(num)
|
||||
data = name.split(',')
|
||||
print(len(data))
|
||||
|
||||
if __name__ == "__main__":
|
||||
# config_read()
|
||||
config_read()
|
||||
Reference in New Issue
Block a user