Run system commands in a skill

Hello!

I’m new using mycroft. Now I’m trying to create my own skill but I have a problem: I’m trying to put into the init.py file, a line which executes a system command. For example, in my case, I’m trying to disable an usb port and the linux comand for that is:

As you can see, the command in the terminal works, after that, an usb port has been disabled, but I want to execute this command using my new skill. I’ve tried writting the command into init.py file but it doesn’t works. Anybody know how to execute system commands and help me? Thank you so much!! :slight_smile:

Use the subprocess module for executing shell commands from python. Here are some good examples: https://www.cyberciti.biz/faq/python-execute-unix-linux-command-examples/