[Tutor] Not sure how to use external command within python code (3.6)

David L Neil pytutor at danceswithmice.info
Sun Dec 8 03:28:16 EST 2019


On 8/12/19 8:57 PM, Robert Alexander wrote:
> Thank you David.

Unfortunately, this list defaults Reply to the previous author, cf 
ReplyAll or reply only to the list.


> To learn this very interesting language I run Python inside the Atom 
> editor with the Hydrogen package and have stop things so to have almost 
> a “Jupiter notebook” environment.

Sounds good. I don't use either of those. Do they allow/enable the 
execution of a single statement, eg a single 'cell' within a Jupiter 
Notebook?


> I also installed a linter and try to conform the code to PEP8 standards. 
> Sometimes it drives me crazy but teaches a lot :)

There's quite a choir singing that song! Remember though, PEP-8 is 
specifically for PSL contributions (although it is useful within the 
wider community), also recall what the 'Zen of Python' says about 
"hobgoblins".

It is probably (close to) heresy, but if you are investing a lot of 
energy into learning Python, perhaps some of these other things fall 
into the category of 'nice to have' - until you're reading for added 
challenges?


> Your reference to REPL implies running interactively in “line mode” to 
> execute, inspect results etc right?

Correct.
You may be able to do this with the aforementioned tools - I don't know. 
Some people use a debugger - but once again, it's more to learn before 
you even leave the starting-line. So, I'd recommend the most basic tool 
that comes with/as Python: running "python3" from the cmdLN.


WebRefs:
https://pythonprogramminglanguage.com/repl/
https://codewith.mu/en/tutorials/1.0/repl
-- 
Regards =dn


More information about the Tutor mailing list