Trying to open folder with python

Viewed 37

I'm making a school project, and I wrote some code so that I could open the folder with the results.

script_path = os.path.abspath(__file__)
script_dir = os.path.split(script_path)[0]
rel_path = "Imagens-prontas/"
self.cur_dir = os.getcwd()
abs_file_path = os.path.join(script_dir, rel_path)
os.system(f"start {abs_file_path}")
sleep(1)

but when I but the program files on the advanced installer and then try to use the function I just get an error: error

0 Answers
Related