0

I am building a very simple python project that will allow the user to read a message in a box and then click OK. This will part of a larger program. The issue is that when I run it in Spyder, the message box ends up behind all other windows. How do I make it be the focus and open in front of all other windows? I am running a Windows 11 computer. I call the below function from another python script.

# import libraries
# sys / os to change working directory
import sys
import os
# easygui for message boxes
from easygui import *

# Create function to set working directory
def setworkdir():
    uni_code = fileopenbox()
    print(uni_code)
    
# Create Welcome Box
def openMsgBox():
    msgbox("Welcome to DocPhoto. Click on Ok to get started")
    setworkdir()

The script to call it:

from docFunctions import openMsgBox

openMsgBox()

I have seen answers where the programmer is trying to do this in tkinter, but I'm not using tkinter. Is there a way to do it without tkinter?

DataGirl
  • 429
  • 9
  • 21

0 Answers0