-1

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.

dazzieta
  • 662
  • 4
  • 20
Moon
  • 7
  • 2
  • 5

1 Answers1

0

I think this is what you need.

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

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

dazzieta
  • 662
  • 4
  • 20
  • this one is worked os.system("xterm -e bash -c 'source base-station.bash; exec bash'") – Moon Jul 06 '16 at 18:26
  • I think you must have a look at this question. http://stackoverflow.com/questions/26236126/how-to-run-bash-command-inside-python-script – dazzieta Jul 06 '16 at 18:26