RE: [beagleboard] Re: Phypton for Beaglebone

Thank you for your responses.
I am sorry, I made a mistake. Yes, I refer to Python software.

I am a beginner, and I would like to learn python to write basic programs in the Beaglebone board.

I need to handle its analog /digital inputs and outputs for a telemetry project .

I read about programing software and I believe Python is easy to begin to learn

If I understood Well your explanation , for now I should use python 3. 5 and ubuntu for my projects. Is it correct?

I apologize if I make mistake but my native language is spanish

Regards

On Wed, 22 Aug 2018 14:44:11 -0500, hcasalncasal1963
<hcasalncasal1963@gmail.com> declaimed the
following:

If I understood Well your explanation , for now I should use python 3. 5 and ubuntu for my projects. Is it correct?

  Just use the Python that comes on the Beaglebone -- it has both 2.7 and
3.5 already in the normal (lxqt) install (don't even consider Ubuntu).

"python" will run using 2.7
"python3" will run using 3.5

debian@beaglebone:~$ uname -a
Linux beaglebone 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018
armv7l GNU/Linux
debian@beaglebone:~$ python --version
Python 2.7.13
debian@beaglebone:~$ python3 --version
Python 3.5.3
debian@beaglebone:~$

Hello Dennis
I am trying to write my first code in python, I am sending an email in python. I wrote this code , but forever generate an error, I don’t know how to find it.

image.png

Here the screenshot with the code and error messages.

Do you have some suggestion that I can to use to eliminate this errors? I would like to learn python step by step before to write a code for beagle bone black
thanks

On Sun, 26 Aug 2018 00:34:00 -0500, Hugo Casal
<hcasalncasal1963@gmail.com> declaimed the
following:

[image: image.png]
Here the screenshot with the code and error messages.

  PLEASE DON'T DO SCREEN SHOTS.

  It's a TEXT CONSOLE -- you can cut and paste the text. A typical
console is only around 200 characters (bytes), not something that is 52000
bytes and is unreadable in my news client. I have to extract the image as a
separate file and open it in a graphics viewer to see it. And even then it
is too coarse a resolution for easy reading.

Do you have some suggestion that I can to use to eliminate this errors? I

  First: You managed to cut off the bottom of the error traceback so
there is no indication of the real error message. We need the entire
traceback for debugging purposes.

  Second: You are entering your code in the interactive prompt, so
figuring out what line number in the trace back maps to a line in the
source is difficult. Put your code into a file, using your favorite editor,
and run it using
  python the_source_file.py
(or python3 if you prefer to use that instead of the default python 2)

  Using a file also means you don't have to retype everything when you
make a mistake.

  THIRD -- YOU NEED TO CHANGE YOUR PASSWORD FOR THAT ACCOUNT. YOU JUST
SENT THE PASSWORD TO EVERYONE READING THIS GROUP!

  Fourth: you are using gmail, which is a mess to use when not coming in
through their web-site; they change certificates every couple of weeks
which plays hob with old mail clients that don't know about the newest
certificate servers, and require one to do special actions if not using one
of their approved clients.

https://www.wpsitecare.com/gmail-smtp-settings/
(read the part starting with "Gmail Wants to make Your Life Difficult"

would like to learn python step by step before to write a code for beagle

  Using complex internet protocols as a "beginner" is /not/ learning
"step by step". {granted -- a week after discovering Python for the Amiga
[version 1.4, I think], I did write a minimal outgoing SMTPd controlled by
an AREXX submittal script invoked by AmigaELM... But I also have an old
degree in comp.sci. and spent some time reading the SMTP related RFC and
the source code for the SMTPd that was NOT working correctly [it wasn't
handshaking CC and BCC addresses, so only TO recipients were getting the
email]}.

  As a beginner for the language, you should read the Python Language
Reference https://docs.python.org/3/reference/index.html , the Tutorial
https://docs.python.org/3/tutorial/index.html , and chapter 4 of the
Library manual https://docs.python.org/3/library/index.html . (Those should
be available packaged with most Python installs, but I can't state what
Debian does with them -- ActiveState packages them as Windows Help files).

  For the BBB, you'll also want to look at the documentation for
Adafruit_BBIO
https://adafruit-beaglebone-io-python.readthedocs.io/en/latest/
https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/using-the-bbio-library
(you can download a PDF from the second)

  Fifth: Toggling an LED on the BBB is going to be much easier than
configuring to send a properly formatted email message. See the email
format RFC https://tools.ietf.org/html/rfc5322 . At a minimum, you need a
few headers and a body; the body is separated from the headers by a blank
line. Your "moviemento" (or whatever it was) is being seen as an unknown
header field. Consider:

text = """\ #backslash so the newline is NOT included here