Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 创建.ini生成器可以';根本无法传递IP地址_Python - Fatal编程技术网

Python 创建.ini生成器可以';根本无法传递IP地址

Python 创建.ini生成器可以';根本无法传递IP地址,python,Python,我想做的是创建一个.ini生成器。除了这个语句,我还有很多工作要做。将有5个代理,但一旦我得到一个工作的其他蛋糕 我们有SUT 0-15,所以我需要一个范围,为什么不打印到文本文档 def ipDSS(): ipDss = input('Please enter your SUT number:') if ipDSS <= 16: lines = ['agent_0_ip=192.168.5.14\n', 'agent_0_

我想做的是创建一个.ini生成器。除了这个语句,我还有很多工作要做。将有5个代理,但一旦我得到一个工作的其他蛋糕

我们有SUT 0-15,所以我需要一个范围,为什么不打印到文本文档

def ipDSS():
    ipDss = input('Please enter your SUT number:')
    if ipDSS <= 16:
        lines = ['agent_0_ip=192.168.5.14\n',
                 'agent_0_mac=99-11-99-11-99-11\n',
                 'agent_0_id=99\n']
        text_file.writelines(lines)
def ipDSS():
ipDss=input('请输入您的SUT编号:')

如果ipDSS您正在将字符串与整数进行比较。请尝试以下方法:

if int(ipDSS) <= 16:
if int(ipDSS)