Moon Moon - 3 months ago 14x
Python Question

PyQt: How to execute shell command when a button clicked?

I have a QtGui and I want to execute a command for executing bash script "source base.bash" when button clicked.

Please answer using python code.


I think this is what you need.

import os
os.system("xterm -hold -e")

Place this code in a function and link that function to button.