Sorry guys, how do you print a message dialog box if a file doesn't exists in python? I am currently using a program to do segmentation of video file and assembling it the files that I need and excluding those I don't. I have completed the tasks but if I randomly type a file that doesn't exists, it will print an error but what I want is a message Dialog box to appear, is there any way to do this?

Recommended Answers

All 2 Replies

Use try...except....else...finally

# error redirection=0 to console
# error redirection=1 to dialog window
app = wx.App(1)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.