-1
def open_img(self):
            try:
                os.startfile("Data")
            except Exception as es:
                messagebox.showerror("Error",f" due to : {str(es)}",parent=self.root)
ti7
  • 16,375
  • 6
  • 40
  • 68
  • 1
    Welcome to Stack Overflow. Please include your code and format your post to include the full traceback error. – ewokx May 11 '22 at 04:25
  • 2
    Does this help? https://stackoverflow.com/questions/17317219/is-there-an-platform-independent-equivalent-of-os-startfile – Fed_Dragon May 11 '22 at 04:27

1 Answers1

1

os.startfile is explicitly only available under Windows per the docs
https://docs.python.org/3/library/os.html#os.startfile

Availability: Windows.

ti7
  • 16,375
  • 6
  • 40
  • 68