[Tutor] Asking about Opening Teminal on Python

Alan Gauld alan.gauld at yahoo.co.uk
Thu Feb 23 20:41:31 EST 2017


On 23/02/17 22:16, Quang nguyen wrote:
> Hi everyone,
> I need to open a terminal on Raspberry Pi 2 in order to execute codesend of
> 433Utils to send a signal to RF Receiver. Anyone know how to open a
> terminal?

Do you really need a terminal? Or do you only need to execute some commands?

In either case the subprocess module should do what you need.
In the first case execute your local terminal program (eg xterm)
In the second case execute the command you want directly
via subprocess. This will be more efficient and save an extra
terminal window popping up to distract your user.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list