-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.

3
  • I assume you are using Linux. Commented Jul 6, 2016 at 17:46
  • yes I'm using linux Commented Jul 6, 2016 at 17:51
  • I'm voting to close this question as off-topic because it's lazy Commented Jul 6, 2016 at 19:03

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

this one is worked os.system("xterm -e bash -c 'source base-station.bash; exec bash'")
I think you must have a look at this question. stackoverflow.com/questions/26236126/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.