ANN: Sarge, a library wrapping the subprocess module, has been released.
Rick Johnson
rantingrickjohnson at gmail.com
Sun Feb 12 23:26:02 EST 2012
On Feb 12, 2:13 pm, Vinay Sajip <vinay_sa... at yahoo.co.uk> wrote:
> wc(ls("/etc", "-1"), "-l")
>
> is not as readable as
>
> call(“ls /etc –1 | wc –l”)
And i agree!
I remember a case where i was forced to use an idiotic API for
creating inputbox dialogs. Something like this:
prompts = ['Height', 'Width', 'Color']
values = [10, 20, Null]
options = [Null, Null, "Red|White|Blue"]
dlg(prompts, values, options)
...and as you can see this is truly asinine!
Later, someone "slightly more intelligent" wrapped this interface up
like this:
dlg = Ipb("Title")
dlg.add("Height")
dlg.add("Width", 39)
dlg.add("Color", ["Red", "White", "Blue"])
dl.show()
...and whilst i prefer this interface over the original, i new we
could make it better; because we had the technology!
dlg = Ipb(
"Title",
"Height=10",
"Width=20",
"Color=Red|Green|Blue",
)
Ahh... refreshing as a cold brew!
More information about the Python-list
mailing list