All pastes #739853 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-17 14:59 UTC
rendered paste body
(work)(~) $ cat mod
from ConfigParser import *
import glob, os

config = SafeConfigParser()
config.read(glob.glob(os.path.expanduser("~/.cfg.d/*")))

for i in config.sections().sorted():
    print i
(work)(~) $ python mod
Traceback (most recent call last):
  File "mod", line 7, in <module>
    for i in config.sections().sorted():
AttributeError: 'list' object has no attribute 'sorted'
(work)(~) $