Jump to content

Python help


maniccyberdog

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...