Hello,
I am attempting to write my first Python script to extract some
information from a file, and place it into another file.
(I am trying to find the physical postions of 4 cells within an FPGA)
I have a working solution, and would appreciate any comments.
for line in lines:
if placed in
[EMAIL PROTECTED] wrote:
Hello,
I am attempting to write my first Python script to extract some
information from a file, and place it into another file.
(I am trying to find the physical postions of 4 cells within an FPGA)
I have a working solution, and would appreciate any comments.
for
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
snip
- If I increase number of elements I am searching for, then I have
more elif...elif. Is there a cleaner solution?
I'm not sure exactly what your lines look like, but this script implies that
every line that matches 'i_a/i_b/ROM' is
Sorry, I forgot to paste the modified version of my code in the post:. I
think this is the same behaviour:
for line in lines:
if placed in line:
if i_a/i_b/ROM/ in line:
pos = (line.split()[4]).split(_)[1]
found = False
for (tag, (start, end)) in
On Mar 12, 10:01 am, Erik Johnson [EMAIL PROTECTED] wrote:
Sorry, I forgot to paste the modified version of my code in the post:. I
think this is the same behaviour:
for line in lines:
if placed in line:
if i_a/i_b/ROM/ in line:
pos = (line.split()[4]).split(_)[1]
On 12 Mar, 18:55, [EMAIL PROTECTED] wrote:
On Mar 12, 10:01 am, Erik Johnson [EMAIL PROTECTED] wrote:
Sorry, I forgot to paste the modified version of my code in the post:. I
think this is the same behaviour:
for line in lines:
if placed in line:
if i_a/i_b/ROM/ in line:
[EMAIL PROTECTED] wrote:
On 12 Mar, 18:55, [EMAIL PROTECTED] wrote:
On Mar 12, 10:01 am, Erik Johnson [EMAIL PROTECTED] wrote:
Sorry, I forgot to paste the modified version of my code in the post:. I
think this is the same behaviour:
for line in lines:
if placed in line:
if