Syntax suggestion.
samir
samirbenabid at linuxmail.org
Wed Aug 30 12:11:46 EDT 2006
Saluton!
Being a fond of Python, I had this idea: Why not making Python a Unix
shell?
But, after a little thinking, i found that the current syntax may be
troublesome.
For example: to list files in bash I'll do
$ ls M*
When for Python it will be:
>>> import UShell
>>> UShell.ls("M*")
or
>>> UShell.exec("ls M*")
So, why not making the use of parentheses when a function is one lined
optional to have commands like this:
>>> UShell.ls "M*"
or even
>>> ls "M*"
Then, why not making the comma optional too when executing such
instructions:
>>> UShell.echo number result
Instead of
>>> UShell.echo number,result
And finally, why not making the string parameter "-less when it is the
only parameter:
>>> UShell.ls M*
Instead of
>>> UShell.ls "M*"
Adiaux
Samir
More information about the Python-list
mailing list