当前位置:   article > 正文

python如何停止子线程_【已解决】python 如何结束子线程呢

python如何停止子线程

复制内容到剪贴板

代码:# -*- coding:utf-8 -*-

import wx

import os

import sys

import configparser

import ftpserver

import time

import threading

import ctypes

import inspect

def startftp(event):#点击 启动FTP 按钮事件

global t

if startbutton.GetLabel()=='启动FTP':

startbutton.SetLabel('停止FTP')

config=configparser.ConfigParser()

config.add_section('ftpd')

config.set('ftpd','anonymous',str(not check.GetValue()))

config.set('ftpd','user',usertext.GetValue())

config.set('ftpd','password',passtext.GetValue())

config.set('ftpd','port',porttext.GetValue())

config.set('ftpd','dir',dirtext.GetValue())

with open('config.ini','w') as conf:

config.write(conf)

time.sleep(1)

t=threading.Thr

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/818262
推荐阅读
相关标签
  

闽ICP备14008679号