Comment on Pythonpy – Command-line Kung Fu with PythonComments−mankyd11yNeat. I'm curious why the quotes around the commands are necessary. Why "py '3 * 1.5'" instead of just "py 3 * 1.5"?−rjgray11yIt's required to prevent the shell from interpreting and expanding special characters. e.g. in the example you provide, without quotes * will be expanded to a list of files in the current directory.−nilved11yMaybe the program only parses its first argument. The asterisk would need to be escaped, in any case, to prevent the shell from expanding it.
Comments
Neat. I'm curious why the quotes around the commands are necessary. Why "py '3 * 1.5'" instead of just "py 3 * 1.5"?
It's required to prevent the shell from interpreting and expanding special characters. e.g. in the example you provide, without quotes * will be expanded to a list of files in the current directory.
Maybe the program only parses its first argument. The asterisk would need to be escaped, in any case, to prevent the shell from expanding it.