By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,171 Members | 776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,171 IT Pros & Developers. It's quick & easy.

I need to split an inf with some specified values.

P: 1

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


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


right now i am doing

targetinf.set_value(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?
Sep 7 '11 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 2,851
What is an "inf"?

"test1"=aaa,bbb is not a valid Python expression. You cannot make an assignment to a literal.
Sep 7 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.