Hello,

I was trying to get a tweakable tailor config, by using the %-formatting
operator on the triple-quoted docstring containing the real config:

================ Example =====================
#!/usr/bin/env /home/vince/bin/tailor

"""
#### THE CONFIG GOES HERE ####
""" % ("titi", "toto")

============== Example end ====================

But was getting this traceback:

Traceback (most recent call last):
  File "/home/vince/bin/tailor", line 35, in <module>
    main()
  File "/home/vince/bin/tailor-0.9.35/vcpx/tailor.py", line 348, in main
    config = Config(open(options.configfile), defaults)
  File "/home/vince/bin/tailor-0.9.35/vcpx/config.py", line 76, in __init__
    config = self.namespace['__doc__']
KeyError: '__doc__'

I workarounded it by:

__doc__ = """
#### THE CONFIG GOES HERE ####
""" % ("titi", "toto")

I still haven't found a way to fix the code, though...

-- 
Vincent Legoll
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to