Many of the comments concern bpython. I believe may more people work with IPython/Jupyter for this sort of thing. I wonder if this would have improved things for the author.
> I have to know empty collections in python are false: ... That fits poorly Zen of Python:
I disagree. I found that code to be completely Pythonic.
> In Julia you can write e.g.: joinpath(homedir(), "bar", "foo") ; But there is no such natural extension in python
Yes, I quite dislike the location of "shutil.rmtree".
The author writes "I can run call command but that will not print result to console." The subprocess.call() prints its results to my console, so I don't know what is going on.
That's just some mistake the author made. Importing modules works just fine and in many style guides it's preferred over importing specific functions/classes.
> Instead we have to look at an entirely different module named shutil with the function rmtree.
This is exactly because of being explicit, like the author wanted Python to be a few lines above. The `os` module maps pretty much exactly onto basic OS operations. There's no rmtree, because it's not a basic mapping. It's a complex procedure, so it's somewhere else (with other complex functions).
> Shell commands like cat are in my fingertips for such things.
This is not a feature of bpython as far as I understand. It's a feature of ipython though. Just choose your repl.
> I run it like this: run(`codesign --verify $app`)
Whatever the language, this is a bad way to run external applications. What if the `$app` contains spaces? Or hyphens? Or semicolons? Again, author approved of the explicit approach in the same article, so they should just pass an array of command and arguments instead.
> In contrast Python distinguishes the two with: ["codesign", "--verify", app] "codesign --verify {}".format(app)
They're different things, and that's a good thing. If you want to print out a list as if it was a single command, you can do `' '.join(the_list)`, but without proper escaping, it's not always going to be correct.
> Here are some examples of what I do in Julia which does not require extensive libraries:
And I call BS at this point. If the author can do "Modifying and resigning iOS apps." in Julia without extensive libraries, they should show that. Calling an external command does not count.
The author writes "Whether dealing with string literals or back-ticks for expressing a command line, you can refer to a variable foo as $foo and it will be escaped properly."
As someone using (and loving) both Python and Julia, I found the title overpromises and the content underdelivers.
More accurate header would be "Personal take on REPL/shell interactions in bpython and Julia".
My take is from scientific computing perspective.
But as my opinion isn't that interesting, I take this opportunity to cite some julia-python-language-relatedtopics on HN.
> I have to know empty collections in python are false: ... That fits poorly Zen of Python:
I disagree. I found that code to be completely Pythonic.
> In Julia you can write e.g.: joinpath(homedir(), "bar", "foo") ; But there is no such natural extension in python
It's in Python 3.5:
Yes, I quite dislike the location of "shutil.rmtree".The author writes "I can run call command but that will not print result to console." The subprocess.call() prints its results to my console, so I don't know what is going on.