maniccyberdog Posted February 17, 2018 Share Posted February 17, 2018 Hi, Just got my packet squirrel, how do i use squirrel script to access the LED and BUTTON. I getting it working in Bash, but not python? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted February 17, 2018 Share Posted February 17, 2018 Can you explain how you're calling the Bash commands in Python? Link to comment Share on other sites More sharing options...
maniccyberdog Posted February 18, 2018 Author Share Posted February 18, 2018 I’m not calling bash commands from python. I can type LED SETUP at a command prompt and this works as expected. If I add the same command to a .py file it doesn’t work. Do I need to import a library to python first? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted February 19, 2018 Share Posted February 19, 2018 17 hours ago, maniccyberdog said: I’m not calling bash commands from python. I can type LED SETUP at a command prompt and this works as expected. If I add the same command to a .py file it doesn’t work. Do I need to import a library to python first? LED and BUTTON are bash functions, so they won't work in Python. You can probably use a Python library to call bash functions, though. E.g. https://stackoverflow.com/questions/4256107/running-bash-commands-in-python Link to comment Share on other sites More sharing options...
maniccyberdog Posted February 19, 2018 Author Share Posted February 19, 2018 Thanks, that was my thoughts, different to what the docs say! ‘These commands simplify interfacing with the hardware and may be called from payloads written in bash, python and PHP, or directly from the console via SSH.’ Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted February 19, 2018 Share Posted February 19, 2018 2 hours ago, maniccyberdog said: Thanks, that was my thoughts, different to what the docs say! ‘These commands simplify interfacing with the hardware and may be called from payloads written in bash, python and PHP, or directly from the console via SSH.’ That is a bit unclear, sorry about the confusion. I think it's talking about the fact that payloads can be written in different languages, not just bash. Sorry about the confusion, maybe @Sebkinne can add this to his ever-growing LOT (list of things)? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.