Modules & positive surprises

J

Jan Danielsson

Hello all,

<IMHO>

Although I have encountered many modules that have impressed me with
regards to what they can actually do -- too be perfectly honest, it's
very rare that I become impressed by the _interfaces_ to the modules.

Using a new module is normally, with my - admittedly - limited
experience, a pain. It's not just about reading the reference material,
and then just use it. You have to figure out how the developer who wrote
the module was thinking. Often there's a (more or less) natural way to
do things, and unfortunately that's not how module developers do it.
It's not a major issue to me personally, since the important part is
that the module can perform its function.

But then there are a few modules that I just love to use, because
they are so "clean" from interface to function. Among them I can't help
mentioning optparse.

Yesterday I found another module which I fell in love with: Python
Cryptography Toolkit (http://www.amk.ca/python/writing/pycrypt/).

It's just so ... elegant, and functional.

</IMHO>
 
K

kyosohma

Hello all,

<IMHO>

Although I have encountered many modules that have impressed me with
regards to what they can actually do -- too be perfectly honest, it's
very rare that I become impressed by the _interfaces_ to the modules.

Using a new module is normally, with my - admittedly - limited
experience, a pain. It's not just about reading the reference material,
and then just use it. You have to figure out how the developer who wrote
the module was thinking. Often there's a (more or less) natural way to
do things, and unfortunately that's not how module developers do it.
It's not a major issue to me personally, since the important part is
that the module can perform its function.

But then there are a few modules that I just love to use, because
they are so "clean" from interface to function. Among them I can't help
mentioning optparse.

Yesterday I found another module which I fell in love with: Python
Cryptography Toolkit (http://www.amk.ca/python/writing/pycrypt/).

It's just so ... elegant, and functional.

</IMHO>

Yeah. I've noticed that myself. There are tons of good modules, but a
lot of the docs are lousy. What's really annoying is that everyone
says that so-and-so is well documented. I love Python, but I wish when
they said some module was well documented, they meant that the docs
were understandable (to n00bs) as well.

Mike
 
S

Steven Bethard

Jan said:
But then there are a few modules that I just love to use, because
they are so "clean" from interface to function. Among them I can't help
mentioning optparse.

<plug>
If you like optparse, you should try argparse:

http://argparse.python-hosting.com/

It has an optparse-style API, along with support for

* positional arguments
* sub-commands
* required options
* options with a variable number of args
* better usage messages
* a much simpler extension mechanism

and more...
</plug>


STeVe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top