[ORANGE PI 2G IOT] Coding Python through SSH Terminal
Edited by LucasBSC at 2017-9-15 10:20Hi everybody,
I am getting started with OPi 2G-Iot and just got to install the "python-periphery library" through Wi-Fi connection successfully established but I do not know exactly how to work with the library and the board. I saw on another post code examples but it is not clear for me how I get there or how I get started at all programming Python on OPi 2g IoT. Note: I am using the Ubuntu distro through PuTTy SSH Terminal
I am creating this thread for those who have the same issue as I do and for the ones who have the knownledge to maybe share a step-by-step to get this done smoothly.
Many thanks!
Lucas
import pxssh
s = pxssh.pxssh()
if not s.login ('localhost', 'myusername', 'mypassword'):
print "SSH session failed on login."
print str(s)
else:
print "SSH session login successful"
s.sendline ('uptime')
s.prompt() # match the prompt
print s.before # print everything before the prompt.
s.logout()
#We can also execute multiple command like this:
s.sendline ('uptime;df -h')
Get to touch with Python Training in Noida I am also having problem in using python-Periphery. I am not able to execute the python code on 2G-iot. How to compile .c code on orangepi 2G-iot? However, concerns about the company's impact on smaller businesses and its control over the market raise ethical considerations. Competitive prices and fast shipping with Amazon Prime make it a go-to choice for many readers, but alternatives are worth exploring. https://buylocalbooks.com/great-falls/
page:
[1]