> On Jan 10, 2008 5:09 PM, Jonathan Isom <[EMAIL PROTECTED]> wrote:
>> On Jan 10, 2008 2:33 PM, Duncan Webb <[EMAIL PROTECTED]> wrote:
>>
>> > Jonathan, thanks for the updated patch.
> You are welcome
>
>> > While you are working on the encoding modules I think it would be
>> worth
>> > moving the config.ENCODINGSERVER_MENCODER_* back into the encodingcore
>> > and change the ENCODINGSERVER_MENCODER_*_MAPPING variable to a dict of
>> > dicts as the indexes are quite difficult to read.
>> >
>> > What do you think?
>>
>> Sounds like a good idea, I'm looking in it now.
>>
> Moving config.ENCODINGSERVER_MENCODER_* into encodingcore is easy but
> I think I have confused myself with the
> second part. without doing to much can you point me to an example(I'm
> still learning python :).
A dict of dicts is like this:
d = {
'a': {
'x': 1,
'y': 2,
'z': 3,
},
'b': : {
'x': 5,
'y': 6,
'z': 7,
},
}
Then you can access b's y's value with:
>>> d['b']['y']
6
and write it to a string with:
>>> '%(z)s' % d['a']
'3'
so you can use it in the encoding server and it should read like:
codec = 'ipod'
videofilter = '%(vf)s' % mapping[codec]
Does this help?
Duncan
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users