Thanks for all the input!!! I really appreciate it. I need to post a
correction to my script. What I sent was an early version. I made a few
minor modifications:<br>

<br>

<pre>import ConfigParser, string, sys, os<br>section = sys.argv[1]<br>interface = sys.argv[3]<br>INI=ConfigParser.ConfigParser()<br>INI.read(&quot;c:\utils\interfaces.ini&quot;)<br>interface_entries=[p for p in INI.options
<br>(section)]<br>interface_list=[INI.get(section, pw) for pw in interface_entries]<br>for i in interface_list:<br>        if i == interface:<br>                os.system(&quot;d:\\tnd\\bin\\cawto.exe -cat NetNet -n l17aesm1 forward red held &quot; + 
<br><span class="q">sys.argv[1] + &quot; &quot; + sys.argv[2] + &quot; &quot; + sys.argv[3] + &quot; &quot; + sys.argv[4])</span></pre>

<br>

I've researched what you all have suggested and I may need to switch to
reading the ini file line by line or using a different file parser. The
ini file is only 100 lines long now, but will likely grow to 500 line
and maybe to 4000 lines. To give you a better background of what I'm
doing with this script, it's running on a network management system
that receives traps. After some processing of the raw trap, messages
get sent to this script for further processing. These messages are for
interface down traps from routers and switches in our network. I use
this script to mitigate the number of interface down messages on our
console. I need to do this because we do not need to know when every
port has gone down (i.e. user ports). This script searches the ini file
for a device name match. Once it has found a match and if the interface
matches as well, I need to message forwarded to the console (the
Windows command). If no matching device or interface is found, then the
script can just exit.
<div class="ea"><span id="e_1069cb9e2e3d18fd_3">- Show quoted text -</span></div>
<br><br><div><span class="gmail_quote">On 9/26/05, <b class="gmail_sendername">Kent Johnson</b> &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Kent Johnson wrote:<br>&gt; *TEST FIRST* Don't optimize until you know it is too slow and you<br>&gt; have a test case that you can time to see if your 'optimizations' are<br>&gt; making it faster.<br><br>Pardon my shouting :-)
<br><br>Kent<br><br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor
</a><br></blockquote></div><br>