Re: parse a string (Cadence Allegro Netlist) to dictionary

2009-11-05 Thread Rhodri James
On Thu, 05 Nov 2009 20:02:53 -, Leland wrote: Hi, I always use readline(), strip(), split() and so on to parse a string. Is there some elegant way to parse the following string into a dictionary {'50MHZ_CLK_SRC' : 'U122.2, R1395.1'}? NET_NAME '50MHZ_CLK_SRC' '@TEST_LIB.TEST(SCH_1):50MHZ_

Re: parse a string (Cadence Allegro Netlist) to dictionary

2009-11-05 Thread metal
On 11月6日, 上午4时02分, Leland wrote: > Hi, > > I always use readline(), strip(), split() and so on to parse a string. > Is there some elegant way to parse the following string into a > dictionary {'50MHZ_CLK_SRC' : 'U122.2, R1395.1'}? > > NET_NAME > '50MHZ_CLK_SRC' > '@TEST_LIB.TEST(SCH_1):50MHZ_CLK_

Re: parse a string (Cadence Allegro Netlist) to dictionary

2009-11-05 Thread Emile van Sebille
On 11/5/2009 12:02 PM Leland said... Hi, I always use readline(), strip(), split() and so on to parse a string. Is there some elegant way to parse the following string into a dictionary {'50MHZ_CLK_SRC' : 'U122.2, R1395.1'}? NET_NAME '50MHZ_CLK_SRC' '@TEST_LIB.TEST(SCH_1):50MHZ_CLK_SRC': C_SI

parse a string (Cadence Allegro Netlist) to dictionary

2009-11-05 Thread Leland
Hi, I always use readline(), strip(), split() and so on to parse a string. Is there some elegant way to parse the following string into a dictionary {'50MHZ_CLK_SRC' : 'U122.2, R1395.1'}? NET_NAME '50MHZ_CLK_SRC' '@TEST_LIB.TEST(SCH_1):50MHZ_CLK_SRC': C_SIGNAL='@test_lib.test(sch_1):\50mhz_clk_