I need to split an inf with some specified values.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • subitha
    New Member
    • Sep 2011
    • 1

    I need to split an inf with some specified values.

    Hi,

    I need to splt an inf with some specified values.But the inf have sections with same key with multiple values .
    For eg:

    [Sample1]
    "test1"=aaa ,bbb
    "test1"=aaa ,ccc
    "test2"=ddd ,hjh

    So i need to split the inf by specifying the values like bbb and ccc.
    SO the expected result should be

    [Sample1]
    "test1"=aaa ,bbb
    "test1"=aaa ,ccc


    right now i am doing

    targetinf.set_v alue(devInfo[3], "\"" + devInfo[1] + "\"", value ) for adding the key value in [Sample1] section


    and devInfo[3] willhave the value [Sample1]
    devInfo[1] will have the value "test1"
    and value= aaa,bbb

    But the issue is the second time it is trying to add

    "test1"=aaa ,bbb got replaced with "test1"=aaa,ccc .

    I need both the values inside that section.


    Can anyone please help me to dig out this problem?
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    What is an "inf"?

    "test1"=aaa ,bbb is not a valid Python expression. You cannot make an assignment to a literal.

    Comment

    Working...