rricharz
Posts: 57
Joined: Tue Apr 19, 2016 8:46 am
Location: Switzerland
Contact: Website

create a block to execute a python script

Wed Nov 08, 2017 10:31 am

Has anybody written an extention to create a block which calls the command line (for example a python or shell script), preferrably with arguments?

I would like to send commands to some hardware (output only), which cannot be done by just changing a gpio pin, but can be easily done from within a python script.

The goal is to allow children to manipulate that hardware using scratch.

ghp
Posts: 1170
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: create a block to execute a python script

Wed Nov 08, 2017 9:49 pm

Hello,
with scratchClient, it is possible to start shell scripts.
See http://www.heppg.de/download/scratchCli ... mmand_line
This specific adapter does not use parameters.
scratchClient is written in python and there are quite a few adapters for all sort of hardware available. What type of hardware do you want to control ?
Regards,
Gerhard

rricharz
Posts: 57
Joined: Tue Apr 19, 2016 8:46 am
Location: Switzerland
Contact: Website

Re: create a block to execute a python script

Thu Nov 09, 2017 7:59 pm

Thanks, Gerhard,

I will try to use what you suggested.

Rene

Return to “Scratch”

Who is online

Users browsing this forum: No registered users and 1 guest