0

I have 6 different python files lets say numbered 1 to 6. 1 is the main GUI and based on buttons pressed on main gui, 2 to 6 are executed to perform their respective work. AutoPy merges them into a single window based executable file, but when I run the executable file it cannot run scripts 2 to 6 and says no such file or directory.

If I place the python files in the same directory, though, it works. How do I get over this?

  • Apparently you get over this by placing the files in the same directory. Why don't you do it like that? – mkrieger1 Jun 11 '23 at 12:04
  • I dont want it because i want one single executable to run. The 1st file tries for google sign in. If sign in is successful, it matches record with a spreadsheet if user is paid. if thats ok, it runs other scripts – UnPadh अनपढ Jun 11 '23 at 12:25

1 Answers1

0

Try to import all your scripts in main file as classes.

Do this for scripts 2 to 6 :

 class Script2:
    def workScript2(self, argument1, ...) :

In your main.py file which lanches the GUI :

from script2 import Script2
.
.

Then you'll use auto-py to generate one executable file base on the main.py

Brian
  • 55
  • 4