News for hackers. Stuff that matters.
Re:Command Line Tools in Python by nilobject on Wednesday June 04, 2008 @10:55PM (#209612)
Oh Scribd, why must you ignore my scroll wheel?

Original PDF:

http://code.noahgift.com/pycon2008/pycon2008_cli_noahgift.pd...

Re:Command Line Tools in Python by eznet on Wednesday June 04, 2008 @11:28PM (#209629)
It definitely indicates a design deficiency when one (myself included) prefers PDF over the default service provided via Scribd.
Re:Command Line Tools in Python by strlen on Thursday June 05, 2008 @03:52AM (#209749)
Interesting article. I like the optparse example, I've always implemented these (Object oriented wrappers for getopt/Getopt::Opt) by hand in Perl (and re-wrote the code every time I went to a different company).

I find it much easier to use YAML (a superset of JSON) files for configuration, however, with the only draw back being tab sensitivity (which can be made easier to deal with by placing vim/emacs instructions as comments, e.g. "vim: ft=yaml ts=4 sw=4 et") . Additionally, there must be some equivalent of XML::Simple out there for Python.

Re:Command Line Tools in Python by arthurk on Thursday June 05, 2008 @07:33AM (#209834)
YAML 1.2 (currently only available as a working draft) will be a superset of JSON. The current YAML 1.1 is not because of some issues like encoding, whitespace, escape characters, etc.

Also read the "Relation to JSON" section of the 1.2 draft: http://yaml.org/spec/1.2/#id2560236

Re:Command Line Tools in Python by rglullis on Thursday June 05, 2008 @12:36AM (#209670)
Re: ConfigParser, do you guys have any idea where it could be more interesting to use a conf file instead of a regular "settings.py" file, where you could set your parameters?

The only case I can think of is one where your configuration may be used by a non-Python application.

Re:Command Line Tools in Python by etal on Thursday June 05, 2008 @01:38AM (#209693)
The INI format lets you group your options with less syntax, if you need more than just the top level. (It's still much less flexible than YAML, though.) Other than that, yeah, mainly legacy config files and programs that weren't written in Python.