lee
lee

Reputation: 1

PyInstaller - include subprocess.Popen call with third party scripts in single file compilation

PyInstaller/Py2exe - include os.system call with third party scripts in single file compilation

Similar question was asked but I was not able to run using the above method. GUI was launch using the exe ( created using PyInstaller - bundle to folder) file and when I tried to run the script through GUI, it simply didn't launch

**Edit PyQt code script_A

class Window(QMainWindow):
def __init__(self):
    super().__init__()
    #code.....
    self.run_script = QPushButton("Run script_A", self)
    self.run_script.clicked.connect(self.script_call)


def script_call(self):
    subprocess.call("python script_B.py")

script_B

print("some value")
#

Script_A is converted to exe using pyinstaller (bundle to a folder). When I run the GUI using the exe file, I am not able to call the script_B.py with either subprocess.call or os.system

Upvotes: 0

Views: 282

Answers (1)

Qolorer
Qolorer

Reputation: 11

Have you used the full path ("C:/path/to/your/file") or short ("file")?

Upvotes: 0

Related Questions