#Import all libraries
import time
import pygame
from tkinter import *
from tkinter import messagebox
#Close tkinter window
Tk().wm_withdraw()
#Initialization pygame window
pygame.init()
#pygame.display.set_icon(pygame.image.load('virus_icon.jpg'))
screen = pygame.display.set_mode((650, 150))
pygame.display.set_caption('TvE virus')
font = pygame.font.SysFont('Lucida Console', 20)
label = font.render('Nice, your computer infected by TvE virus', 1, (12, 140, 0, 1))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
time.sleep(0.10)
pygame.display.set_icon(pygame.image.load('virus_icon.jpg'))
screen = pygame.display.set_mode((850, 150))
pygame.display.set_caption('TvE virus')
messagebox.showerror('Deleting all data and info')
screen.fill((0, 0, 0))
screen.blit(label, (50, 50))
pygame.display.update()
Для конвертации использую библиотеку pyinstaller