<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - Python</title>
		<link>http://www.daniweb.com/forums/</link>
		<description><![CDATA[Our Python forum is the place for Q&A-style discussions related to this interpreted OOP language.]]></description>
		<language>en-US</language>
		<lastBuildDate>Sat, 21 Nov 2009 03:33:44 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - Python</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>Trouble with switching to and from directorys</title>
			<link>http://www.daniweb.com/forums/thread240142.html</link>
			<pubDate>Sat, 21 Nov 2009 02:44:40 GMT</pubDate>
			<description><![CDATA[hi everyone. Say I have my project directorys set up like so: 
 
/glider 
   /libs 
      classes.py 
   /graphics 
      /rooms 
          room images go here 
 
I'm trying to access a image from graphics/rooms, but from classes.py. I'm using pygame, and I know to go back a folder in a dir; you...]]></description>
			<content:encoded><![CDATA[<div>hi everyone. Say I have my project directorys set up like so:<br />
<br />
/glider<br />
   /libs<br />
      classes.py<br />
   /graphics<br />
      /rooms<br />
          room images go here<br />
<br />
I'm trying to access a image from graphics/rooms, but from classes.py. I'm using pygame, and I know to go back a folder in a dir; you use:<br />
 <pre style="margin:20px; line-height:13px">#&nbsp; go back a folder and load an image<br />
pygame.image.load( '..\image.bmp' )</pre><br />
but how would I go from classes.py to graphics/rooms/room.bmp? I thought of using:<br />
<br />
 <pre style="margin:20px; line-height:13px">pygame.image.load( '..\graphics/rooms/room.bmp' )</pre><br />
you think you could use that, but it doesn't work... anyone know what could be the problem? any comments or help would be great. Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>fallopiano</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240142.html</guid>
		</item>
		<item>
			<title>Python file not working</title>
			<link>http://www.daniweb.com/forums/thread240129.html</link>
			<pubDate>Sat, 21 Nov 2009 01:11:26 GMT</pubDate>
			<description><![CDATA[Trying to make a file that tests how many seconds it takes for python to use a while loop to count how many seconds 1000 loops takes. Not working, I don't know why. Every time I run this it outputs "('It took 0,0')"...The while loop didn't start.  
 
  <div class="codeblock"> <div class="spaced">...]]></description>
			<content:encoded><![CDATA[<div>Trying to make a file that tests how many seconds it takes for python to use a while loop to count how many seconds 1000 loops takes. Not working, I don't know why. Every time I run this it outputs &quot;('It took 0,0')&quot;...The while loop didn't start. <br />
<br />
 <pre style="margin:20px; line-height:13px">import time<br />
import math<br />
<br />
count = 0<br />
PrevTime = time.time()<br />
<br />
while count &lt; 1000:<br />
&nbsp; &nbsp; count +=1<br />
&nbsp; &nbsp; if count == 1000:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;It took &quot;, time.time() - PrevTime)<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw_input()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>ffs82defxp</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240129.html</guid>
		</item>
		<item>
			<title>How to remove an item from a list?</title>
			<link>http://www.daniweb.com/forums/thread240126.html</link>
			<pubDate>Sat, 21 Nov 2009 00:44:36 GMT</pubDate>
			<description>I require some help on how to go about writing a function that removes an item from a list along with how to return a list with an item removed. Any help would be gladly appreciated.</description>
			<content:encoded><![CDATA[<div>I require some help on how to go about writing a function that removes an item from a list along with how to return a list with an item removed. Any help would be gladly appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Judgment</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240126.html</guid>
		</item>
		<item>
			<title>How to split new line character?</title>
			<link>http://www.daniweb.com/forums/thread240074.html</link>
			<pubDate>Fri, 20 Nov 2009 19:59:50 GMT</pubDate>
			<description><![CDATA[Hi I have a text file which has the following: 
 
'username=sonia\n', 'password=password' 
 
I want to split sonia and place it in a variable called username. 
 
I was able to accomplish the following but could not remove the new line characters. 
 
text = 'username=sonia\n', 'password=password']]></description>
			<content:encoded><![CDATA[<div>Hi I have a text file which has the following:<br />
<br />
'username=sonia\n', 'password=password'<br />
<br />
I want to split sonia and place it in a variable called username.<br />
<br />
I was able to accomplish the following but could not remove the new line characters.<br />
<br />
text = 'username=sonia\n', 'password=password'<br />
<br />
text[0].split('=')[1]<br />
<br />
This returns 'sonia\n'<br />
<br />
So now how do I get rid of the \n?<br />
<br />
What should be modified to also remove the new line '\n'?<br />
<br />
<br />
Thanks in advance.<br />
<br />
Sonia</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sonial8</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240074.html</guid>
		</item>
		<item>
			<title>Random.choice, A Pronouncing Dictionary, The Polysemy</title>
			<link>http://www.daniweb.com/forums/thread240072.html</link>
			<pubDate>Fri, 20 Nov 2009 19:55:18 GMT</pubDate>
			<description><![CDATA[People, please help me! 
I must write 30 programs on python but not well understand this program. I don't know how to write 4 programs which are simple.  
*1)* The polysemy of a word is the number of senses it has. Using WordNet, we can determine that the noun dog has 7 senses with:...]]></description>
			<content:encoded><![CDATA[<div>People, please help me!<br />
I must write 30 programs on python but not well understand this program. I don't know how to write 4 programs which are simple. <br />
<span style="font-weight:bold">1)</span> The polysemy of a word is the number of senses it has. Using WordNet, we can determine that the noun dog has 7 senses with: len(wn.synsets('dog', 'n')). Compute the average polysemy of nouns, verbs, adjectives and adverbs according to WordNet.<br />
<span style="font-weight:bold">2)</span> Use one of the predefined similarity measures to score the similarity of each of the following pairs of words. Rank the pairs in order of decreasing similarity. How close is your ranking to the order given here, an order that was established experimentally by (Miller &amp; Charles, 1998): car-automobile, gem-jewel, journey-voyage, boy-lad, coast-shore, asylum-madhouse, magician-wizard, midday-noon, furnace-stove, food-fruit, bird-cock, bird-crane, tool-implement, brother-monk, lad-brother, crane-implement, journey-car, monk-oracle, cemetery-woodland, food-rooster, coast-hill, forest-graveyard, shore-woodland, monk-slave, coast-forest, lad-wizard, chord-smile, glass-magician, rooster-voyage, noon-string.<br />
<span style="font-weight:bold">3)</span> Modify the text generation program, to do the following tasks:<br />
Store the n most likely words in a list words then randomly choose a word from the list using random.choice(). (You will need to import random first.)<br />
<span style="font-weight:bold">4)</span> To analyze a Pronouncing Dictionary. Find how much different words it contains. What percent of words from this dictionary may have a different pronunciation?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>olganneke</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240072.html</guid>
		</item>
		<item>
			<title>Timed loop to check for file</title>
			<link>http://www.daniweb.com/forums/thread240053.html</link>
			<pubDate>Fri, 20 Nov 2009 17:53:25 GMT</pubDate>
			<description><![CDATA[Hi, 
 
Very new to Python and still stumbling around but need some help. 
  
As part of a larger script, I'd like to run a routine that checks for the existence of a file once a second for about 3 minutes and if it suddenly appears, carry on with the rest of the script but if its not there, keep on...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
Very new to Python and still stumbling around but need some help.<br />
 <br />
As part of a larger script, I'd like to run a routine that checks for the existence of a file once a second for about 3 minutes and if it suddenly appears, carry on with the rest of the script but if its not there, keep on looking until the 3 minutes are up (and then stop processing any more of the script).<br />
<br />
I know I can use  <pre style="margin:20px; line-height:13px">os.path.isfile</pre> to check and it must be some kind of while/for loop but just can't get my head round what i need.<br />
<br />
Any help would be most appreciated.<br />
<br />
Cheers,<br />
<br />
Mattokun</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Mattokun99</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240053.html</guid>
		</item>
		<item>
			<title>experimental RPG/Interactive Fiction</title>
			<link>http://www.daniweb.com/forums/thread240029.html</link>
			<pubDate>Fri, 20 Nov 2009 14:48:16 GMT</pubDate>
			<description><![CDATA[I've been thinking recently about how cool it would be to make a rpg/text adventure game where you could fight monsters- in my case fallout3 inspired mutant hicks from the game point lookout. I have the room classes. (I can give code later in the day). how would i make a weapons class, monster...]]></description>
			<content:encoded><![CDATA[<div>I've been thinking recently about how cool it would be to make a rpg/text adventure game where you could fight monsters- in my case fallout3 inspired mutant hicks from the game point lookout. I have the room classes. (I can give code later in the day). how would i make a weapons class, monster class, etc for the rpg elements of the game?<br />
<br />
Luckily, i found a post on a battle system so thats out of the way. Like i said, is there a way to make a list of weapons and monsters and append those weapons you can pick up and the monsters/hicks to a room class?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python user</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240029.html</guid>
		</item>
		<item>
			<title>How to compile and run a boost python program???</title>
			<link>http://www.daniweb.com/forums/thread240002.html</link>
			<pubDate>Fri, 20 Nov 2009 12:19:56 GMT</pubDate>
			<description><![CDATA[Hai friends, 
 
                  I have a question which is very fundamental.. 
 
After installing boost python and bjam from ubuntu 9.04 repositories i can't find a clear detailed description about compiling and running the boost python program from it's tutorials .. Can any among you please tell...]]></description>
			<content:encoded><![CDATA[<div>Hai friends,<br />
<br />
                  I have a question which is very fundamental..<br />
<br />
After installing boost python and bjam from ubuntu 9.04 repositories i can't find a clear detailed description about compiling and running the boost python program from it's tutorials .. Can any among you please tell me what are the options we need to be give to compile like<br />
 <pre style="margin:20px; line-height:13px">g++ filename path/to/boost etc.,</pre>and run this hello world boost python program <a rel="nofollow" class="t" href="http://wiki.python.org/moin/boost.python/SimpleExample" target="_blank">http://wiki.python.org/moin/boost.python/SimpleExample</a> using and without bjam.<br />
<br />
               This is what i did. I created a c++ file named hello.cpp with the contents..<br />
<br />
 <pre style="margin:20px; line-height:13px">#include &lt;string&gt;<br />
<br />
namespace { // Avoid cluttering the global namespace.<br />
<br />
&nbsp; // A couple of simple C++ functions that we want to expose to Python.<br />
<br />
&nbsp; std::string greet() { return &quot;hello, world&quot;; }<br />
&nbsp; int square(int number) { return number * number; }<br />
}<br />
#include &lt;boost/python.hpp&gt;<br />
using namespace boost::python;<br />
<br />
BOOST_PYTHON_MODULE(getting_started1)<br />
<br />
{<br />
&nbsp; &nbsp; // Add regular functions to the module.<br />
&nbsp; &nbsp; def(&quot;greet&quot;, greet);<br />
&nbsp; &nbsp; def(&quot;square&quot;, square);<br />
}</pre><br />
         What should i do to make this as &quot;a shared library and put it on the PYTHONPATH&quot; as said in the tutorial?? (This question may sound trivial or silly but these are essential components that &quot;must must&quot; be included while writing a tutorial bcoz. it's gonna be read by people at all levels.. This 'll dampen the spirits of the beginner if he can't get to know how to compile and run it..). Please explain me in detail..<br />
FYI:I'm using python 3.1<br />
<br />
Thanks &amp; Regards..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python.noob</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread240002.html</guid>
		</item>
		<item>
			<title>Please help with XChat module</title>
			<link>http://www.daniweb.com/forums/thread239954.html</link>
			<pubDate>Fri, 20 Nov 2009 07:46:17 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>Python Syntax</strong>...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">import xchat<br />
hooker = None<br />
<br />
__module_name__ = &quot;Away Script&quot;<br />
__module_version__ = '1.0'<br />
__module_description__ = &quot;States that your away&quot;<br />
<br />
<br />
def away(word, word_eol, userdata):<br />
&nbsp; &nbsp; &nbsp; &nbsp; chan = xchat.get_info('channel')<br />
&nbsp; &nbsp; &nbsp; &nbsp; xchat.command(&quot;msg &quot; + chan + &quot; I'm Away&quot;)<br />
def toggle(word, word_eol, userdata):<br />
&nbsp; &nbsp; &nbsp; &nbsp; global a<br />
&nbsp; &nbsp; &nbsp; &nbsp; if word[1] == 'on':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xchat.hook_print(&quot;Channel Msg Hilight&quot;, away)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xchat.command(&quot;echo Loaded&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif word[1] == 'off':&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xchat.unhook(a)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hooker = None<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xchat.command(&quot;echo Unloaded&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xchat.command(&quot;echo Use /a on or /a off&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; return xchat.EAT_ALL<br />
xchat.hook_command(&quot;a&quot;, toggle)<br />
a = xchat.hook_print(&quot;Channel Msg Hilight&quot;, away)<br />
xchat.command(&quot;a off&quot;)</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>nevets04</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239954.html</guid>
		</item>
		<item>
			<title>it WORKS! but ... :)</title>
			<link>http://www.daniweb.com/forums/thread239943.html</link>
			<pubDate>Fri, 20 Nov 2009 06:48:14 GMT</pubDate>
			<description><![CDATA[Hi Everyone. 
 
After many months my program works .. man, so much happiness, and it wasn't a small project, my first program is 400 lines of code LOL 
 
OK .. so i wanted to fix up some of the "prettines" and was looking for some ideas. 
 
One idea is this .. i used py2exe to create a exe (i used...]]></description>
			<content:encoded><![CDATA[<div>Hi Everyone.<br />
<br />
After many months my program works .. man, so much happiness, and it wasn't a small project, my first program is 400 lines of code LOL<br />
<br />
OK .. so i wanted to fix up some of the &quot;prettines&quot; and was looking for some ideas.<br />
<br />
One idea is this .. i used py2exe to create a exe (i used the &quot;single&quot; profile but ended up with a HUGE mass of files (nearly 1000 of them) and wondered if i did something wrong, on top of that, when i run the resulting .exe i get a command prompt window as well, which i would rather not have and wondered if there was a way to stop it.<br />
<br />
I also use in my code<br />
root.overrideredirect(1)<br />
to prevent window resizing and moving, but as a result i lose the taskbar of the program so i can't easily select it and return to it if i like. To get it back am i forced to not use the overrideredirect? I want to lock the windows though....<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Aiban</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239943.html</guid>
		</item>
		<item>
			<title>Python code to save the contents</title>
			<link>http://www.daniweb.com/forums/thread239922.html</link>
			<pubDate>Fri, 20 Nov 2009 05:09:48 GMT</pubDate>
			<description>Hello I an new to python I want to write a function which save the contents to disk I am using GTK also to design . 
On clicking the save menu item the output should be able to saved at any desired location  {on_save_activate()}.  
Please help me to write the function .</description>
			<content:encoded><![CDATA[<div>Hello I an new to python I want to write a function which save the contents to disk I am using GTK also to design .<br />
On clicking the save menu item the output should be able to saved at any desired location  {on_save_activate()}. <br />
Please help me to write the function .</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>richirich007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239922.html</guid>
		</item>
		<item>
			<title>Windows7 and Python</title>
			<link>http://www.daniweb.com/forums/thread239872.html</link>
			<pubDate>Fri, 20 Nov 2009 00:19:08 GMT</pubDate>
			<description>Does anyone use Python on a Windows7 machine? 
What is your experience?  Does it work well? 
 
I am thinking about getting a new computer and also start some Python programming.</description>
			<content:encoded><![CDATA[<div>Does anyone use Python on a Windows7 machine?<br />
What is your experience?  Does it work well?<br />
<br />
I am thinking about getting a new computer and also start some Python programming.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>HiHe</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239872.html</guid>
		</item>
		<item>
			<title>New to Python - First Program</title>
			<link>http://www.daniweb.com/forums/thread239871.html</link>
			<pubDate>Fri, 20 Nov 2009 00:18:50 GMT</pubDate>
			<description><![CDATA[First Program - CalcPro.py 
 
How do I make labels like in Batch so that I can 'go to' or initiate certain blocks of code when needed? And what is the command for goto? Whats the command for cls (or in other words clearing the screen)? 
 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>First Program - CalcPro.py<br />
<br />
How do I make labels like in Batch so that I can 'go to' or initiate certain blocks of code when needed? And what is the command for goto? Whats the command for cls (or in other words clearing the screen)?<br />
<br />
 <pre style="margin:20px; line-height:13px">while 1:<br />
<br />
&nbsp; &nbsp; import math<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; print (&quot;CalcPro - Choose a number option to proceed&quot;)<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; print (&quot;1)&nbsp; Add &quot;)<br />
&nbsp; &nbsp; print (&quot;2)&nbsp; Subtract&quot;)<br />
&nbsp; &nbsp; print (&quot;3)&nbsp; Multiply&quot;)<br />
&nbsp; &nbsp; print (&quot;4)&nbsp; Divide&quot;)<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; print (&quot;EXIT - type 'exit' at any time to close.&quot;)<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; choice = raw_input(&quot;Option --&gt; &quot;)<br />
<br />
&nbsp; &nbsp; if choice == &quot;exit&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; ExitChoice = raw_input(&quot;Are you sure you want to exit out or CalcPro? ([Y/N])&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if ExitChoice == &quot;y&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quit()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; if choice == &quot;1&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Up to 3 numbers, if you want just 2 or 1, simply fill in 0 for the rest&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; num1 = input(&quot;Number1 --&gt; &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num2 = input(&quot;Number2 --&gt; &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num3 = input(&quot;Number3 --&gt; &quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Solution = num1 + num2 + num3<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Your Solution is &quot;) + `float(Solution)`<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw_input()<br />
<br />
&nbsp; &nbsp; if choice == &quot;2&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Up to 3 numbers, if you want just 2 or 1, simply fill in 0 for the rest&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; num1 = input(&quot;Number1 --&gt; &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num2 = input(&quot;Number2 --&gt; &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num3 = input(&quot;Number3 --&gt; &quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Solution = num1 - num2 - num3<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Your Solution is &quot;) + `float(Solution)`<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw_input()<br />
<br />
&nbsp; &nbsp; if choice == &quot;3&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Up to 2 numbers, if you want more, restart program.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; num1 = input(&quot;Number1 --&gt;&nbsp;  &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num2 = input(&quot;Number3 --&gt;&nbsp;  &quot;)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; Solution = num1 * num2<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Your Solution is &quot;) + `float(Solution)`<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw_input()<br />
<br />
&nbsp; &nbsp; if choice == &quot;4&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Up to 2 numbers, if you want more, restart program.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; num1 = input(&quot;Number1 --&gt;&nbsp;  &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; num2 = input(&quot;Number2 --&gt;&nbsp;  &quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Solution = num1 / num2<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (&quot;Your Solution is &quot;) + `float(Solution)`<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw_input()</pre><br />
Suggestions/Feedback/Answers <br />
<br />
Thank you all, <br />
<br />
~FFS</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>ffs82defxp</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239871.html</guid>
		</item>
		<item>
			<title>File opening help</title>
			<link>http://www.daniweb.com/forums/thread239852.html</link>
			<pubDate>Thu, 19 Nov 2009 22:02:32 GMT</pubDate>
			<description><![CDATA[I'm trying to write a program that will open a file named "data.dat". This file contains an unknown number of values that I need to have read and averaged together and is written such that each line has one value. I need to have the data in this file be averaged and printed to the screen. I'm...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to write a program that will open a file named &quot;data.dat&quot;. This file contains an unknown number of values that I need to have read and averaged together and is written such that each line has one value. I need to have the data in this file be averaged and printed to the screen. I'm having trouble just getting started with this and any help would be appreciated. Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>dmcadidas15</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239852.html</guid>
		</item>
		<item>
			<title>pygame tutorials</title>
			<link>http://www.daniweb.com/forums/thread239832.html</link>
			<pubDate>Thu, 19 Nov 2009 19:42:32 GMT</pubDate>
			<description>i have the book for beginners python and pygame and i read through it and learn a lot but is there a place where they have more tutorials i just want to learn more and more about this cause i love making games. 
 
i have been to the website and know they have some there but is there anywhere els?</description>
			<content:encoded><![CDATA[<div>i have the book for beginners python and pygame and i read through it and learn a lot but is there a place where they have more tutorials i just want to learn more and more about this cause i love making games.<br />
<br />
i have been to the website and know they have some there but is there anywhere els?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>njam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239832.html</guid>
		</item>
		<item>
			<title>One line at a time compiling</title>
			<link>http://www.daniweb.com/forums/thread239807.html</link>
			<pubDate>Thu, 19 Nov 2009 17:24:51 GMT</pubDate>
			<description>How do I get my python code to compile one line at a time so I can see exactly how the code works. If anyone knows how to do this with Wing IDE that would also be helpful. Thanks.</description>
			<content:encoded><![CDATA[<div>How do I get my python code to compile one line at a time so I can see exactly how the code works. If anyone knows how to do this with Wing IDE that would also be helpful. Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239807.html</guid>
		</item>
		<item>
			<title>stock trading application</title>
			<link>http://www.daniweb.com/forums/thread239763.html</link>
			<pubDate>Thu, 19 Nov 2009 14:16:15 GMT</pubDate>
			<description>hi! 
i am making a prototype of an online stock trading application in python using tkinter module for Gui and a csv file for all the stock market data. 
i wish to know if there is an api using which stock prices can be changed if i keep all the latest data in a list, using some time constraint...</description>
			<content:encoded><![CDATA[<div>hi!<br />
i am making a prototype of an online stock trading application in python using tkinter module for Gui and a csv file for all the stock market data.<br />
i wish to know if there is an api using which stock prices can be changed if i keep all the latest data in a list, using some time constraint functionality as in the prices get changed after some time interval. this project has  very high data latency and uses previous day prices for trading..please help..!!  <br />
<br />
v_rod</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>v_rod</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239763.html</guid>
		</item>
		<item>
			<title>Arguments to a simple function via the command line?</title>
			<link>http://www.daniweb.com/forums/thread239722.html</link>
			<pubDate>Thu, 19 Nov 2009 11:48:25 GMT</pubDate>
			<description>How do I send arguments to a function by using windows command prompt?</description>
			<content:encoded><![CDATA[<div>How do I send arguments to a function by using windows command prompt?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>mahela007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239722.html</guid>
		</item>
		<item>
			<title>pygame problem</title>
			<link>http://www.daniweb.com/forums/thread239681.html</link>
			<pubDate>Thu, 19 Nov 2009 08:18:03 GMT</pubDate>
			<description><![CDATA[i followed official pygame tutorials, and stuck on the first one, the "introduction":$.  there's a line 10 that goes : 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680"...]]></description>
			<content:encoded><![CDATA[<div>i followed official pygame tutorials, and stuck on the first one, the &quot;introduction&quot;:$.  there's a line 10 that goes :<br />
 <pre style="margin:20px; line-height:13px">ball = pygame.image.load(&quot;ball.bmp&quot;)</pre>and, since i don't have a &quot;ball.bmp&quot; in my computer, i decided to draw it in paint. now, when i write that line in the python interpreter, it returns me an error. what is the problem? i tried giving path, but there was error again. what to do?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>emir_gradacac</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239681.html</guid>
		</item>
		<item>
			<title>Python - Using a text file to feed into a python dictionary</title>
			<link>http://www.daniweb.com/forums/thread239646.html</link>
			<pubDate>Thu, 19 Nov 2009 05:08:17 GMT</pubDate>
			<description>Completely frustrating - I have been googling for a solution for this for a couple of hours now. I have this little bit of code that I wish to read a text file into a Python Dictionary. I used this dictionary format internally within the another piece of code I am writing and had no problems. But...</description>
			<content:encoded><![CDATA[<div>Completely frustrating - I have been googling for a solution for this for a couple of hours now. I have this little bit of code that I wish to read a text file into a Python Dictionary. I used this dictionary format internally within the another piece of code I am writing and had no problems. But trying to import it from an external text file I get a syntax error <br />
It doesn't like : or &lt; &gt; I suspect it is to do with the unicode. I have even removed all the illegal characters but it didn't like that either. I even place a u in front of &quot;word.txt&quot; with no success.<br />
Can someone please explain what is the right syntax for the creation of a string in a text file that can be read into a Python dictionary from and external text file.<br />
<br />
This is the code<br />
<br />
 <pre style="margin:20px; line-height:13px">word_dic = eval(open(&quot;word.txt&quot;).read())</pre><br />
The text file contains the following <br />
<br />
'{}maintitle{}': 'pocket',  <span style="font-style:italic"># {}maintitle{} is the text I wished to be replaced by pocket</span><br />
'{}stylesheet{}': 'generic',<br />
'{}maintitle{}': 'generic',<br />
'{}stylesheet{}': 'generic',<br />
<br />
A big thank you in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>furblender</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239646.html</guid>
		</item>
		<item>
			<title>Pygame help</title>
			<link>http://www.daniweb.com/forums/thread239630.html</link>
			<pubDate>Thu, 19 Nov 2009 03:43:38 GMT</pubDate>
			<description><![CDATA[hey guys 
I'm kine a new to pygame and i want to make a space game but i dont know how to make the screen folow my ship. 
if you have any info on this plz let me know. 
 
Thanks :)]]></description>
			<content:encoded><![CDATA[<div>hey guys<br />
I'm kine a new to pygame and i want to make a space game but i dont know how to make the screen folow my ship.<br />
if you have any info on this plz let me know.<br />
<br />
Thanks :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>njam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239630.html</guid>
		</item>
		<item>
			<title>List help</title>
			<link>http://www.daniweb.com/forums/thread239605.html</link>
			<pubDate>Thu, 19 Nov 2009 01:10:40 GMT</pubDate>
			<description><![CDATA[Im trying to access a variable in a list that is 3 places earlier in the list. For example list_1[dogs, cats, pigs, hamsters, kids]. If Im trying to access the word cats based on the position of kids how would I do that? I know list_1[4] returns kids and I want to be able to return cats without...]]></description>
			<content:encoded><![CDATA[<div>Im trying to access a variable in a list that is 3 places earlier in the list. For example list_1[dogs, cats, pigs, hamsters, kids]. If Im trying to access the word cats based on the position of kids how would I do that? I know list_1[4] returns kids and I want to be able to return cats without using list_1[1]. I tried making list_1[4] = a and then doing print list_1[a - 3] but i get a syntax error since I cant subtract an int from a string. Anyone think they can help me out? Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>dmcadidas15</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239605.html</guid>
		</item>
		<item>
			<title><![CDATA[Error msg "NameError: global name 'atomName' is not defined" when calling class fnct.]]></title>
			<link>http://www.daniweb.com/forums/thread239604.html</link>
			<pubDate>Thu, 19 Nov 2009 00:57:17 GMT</pubDate>
			<description><![CDATA[Hello, I've started with python (3) recently. Initialy only for scripting. Now I'm trying the object oriented bit.  
 
I'm getting the following error message  
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hello, I've started with python (3) recently. Initialy only for scripting. Now I'm trying the object oriented bit. <br />
<br />
I'm getting the following error message <br />
 <pre style="margin:20px; line-height:13px">&lt;Atom.Atom object at 0x7f0b09597fd0&gt;<br />
Traceback (most recent call last):<br />
&nbsp; File &quot;./Main.py&quot;, line 7, in &lt;module&gt;<br />
&nbsp; &nbsp; print (t.getAtomName())<br />
&nbsp; File &quot;/home/jorge/Documentos/projetos/mestrado/códigos/cartesian_zmatrix/Atom.py&quot;, line 22, in getAtomName<br />
&nbsp; &nbsp; return atomName<br />
NameError: global name 'atomName' is not defined</pre> when calling the function 'getAtomName()' of the 'Atom' class. This class is on the file Atom.py on the same directory as the test code.<br />
<br />
below is my test code and Atom class code:<br />
<br />
 <pre style="margin:20px; line-height:13px"> #! /usr/bin/python3<br />
<br />
from Atom import *<br />
<br />
t = Atom(&quot;C&quot;,12)<br />
print (t.getAtomName())</pre><br />
 <pre style="margin:20px; line-height:13px">class Atom:<br />
<br />
&nbsp; &nbsp; cartesian = dict()<br />
&nbsp; &nbsp; bondList = list()<br />
&nbsp; &nbsp; atomName = str()<br />
&nbsp; &nbsp; atomicNum = int()<br />
<br />
&nbsp; &nbsp; def __init__(self,name, atNum):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.atomName = name<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.atomicNum = atNum<br />
<br />
&nbsp; &nbsp; def setCoordinates(x, y, z):<br />
&nbsp; &nbsp; &nbsp; &nbsp; catesian['x'] = x<br />
&nbsp; &nbsp; &nbsp; &nbsp; catesian['y'] = y<br />
&nbsp; &nbsp; &nbsp; &nbsp; catesian['z'] = z<br />
<br />
&nbsp; &nbsp; def addBondedAtom(Atom):<br />
&nbsp; &nbsp; &nbsp; &nbsp; bondList.append(Atom)<br />
<br />
&nbsp; &nbsp; def getAtomName():<br />
&nbsp; &nbsp; &nbsp; &nbsp; return atomName<br />
&nbsp; &nbsp; def getAtomicNumber():<br />
&nbsp; &nbsp; &nbsp; &nbsp; return atomicNum<br />
&nbsp; &nbsp; def getBondList():<br />
&nbsp; &nbsp; &nbsp; &nbsp; return bondList<br />
&nbsp; &nbsp; def getCartesian():<br />
&nbsp; &nbsp; &nbsp; &nbsp; return cartesian</pre><br />
I appreciate any help, and also any tip you might have considering I've just started with python.<br />
<br />
Abraço,<br />
Jorge</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>jorgejch</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239604.html</guid>
		</item>
		<item>
			<title>Help With finding the Area of regular polygons</title>
			<link>http://www.daniweb.com/forums/thread239591.html</link>
			<pubDate>Wed, 18 Nov 2009 23:14:40 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>Python Syntax</strong>...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">area = ((length ** 2) * numSides) / (4 * (math.tan(FULL_ROTATION / (2 * numSides)\<br />
)))</pre><br />
this is my thought but I can't figure it out, I always get the wrong value.<br />
<br />
I need to get my answer in degrees. but even when i use<br />
<br />
 <pre style="margin:20px; line-height:13px">return math.degrees(area)</pre><br />
at the end of my function the answer is way off.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>scrace89</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239591.html</guid>
		</item>
		<item>
			<title>Python Socket and an incoming ByteArray</title>
			<link>http://www.daniweb.com/forums/thread239546.html</link>
			<pubDate>Wed, 18 Nov 2009 20:18:52 GMT</pubDate>
			<description><![CDATA[Hi, 
  
Hello, 
 
I've written a simple Python(2.6) server that I am connecting to through a Binary Socket from an AIR application. I can successfully send text and numbers through, but when I try and send a 3 byte ByteArray through, I receive the ByteArray as a string. More specifically the String...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
 <br />
Hello,<br />
<br />
I've written a simple Python(2.6) server that I am connecting to through a Binary Socket from an AIR application. I can successfully send text and numbers through, but when I try and send a 3 byte ByteArray through, I receive the ByteArray as a string. More specifically the String 'A f'. I am absolutely certain that the ByteArray is ok when it leaves Air. I am very new to Python, so if anyone can suggest where I might be going wrong I'd really appreciate it.<br />
<br />
Thanks in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>1ndivisible</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239546.html</guid>
		</item>
		<item>
			<title>pcap help</title>
			<link>http://www.daniweb.com/forums/thread239530.html</link>
			<pubDate>Wed, 18 Nov 2009 19:01:01 GMT</pubDate>
			<description><![CDATA[I tried installing pcapy 0.10.4 and i get an error. 
 
C:>setup.py install 
running install 
running build 
running build_ext 
building 'pcapy' extension 
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nolog /0x /MD /W3 /GS- /DNDEBUG -DWIN32=1 -Ic:\devel\oss\wpdpack\Include -...]]></description>
			<content:encoded><![CDATA[<div>I tried installing pcapy 0.10.4 and i get an error.<br />
<br />
C:&gt;setup.py install<br />
running install<br />
running build<br />
running build_ext<br />
building 'pcapy' extension<br />
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nolog /0x /MD /W3 /GS- /DNDEBUG -DWIN32=1 -Ic:\devel\oss\wpdpack\Include - IC:\Python26\include -IC:\Python26\PC /Tppcapdumper.cc /Fobuild\temp.win32-2.6\Release\pcapdumper.obj<br />
pcapdumper.cc<br />
pcapdumper.cc(12) : fatal error C1083: Cannot open include file: 'pcap.h' : No such file or directory<br />
error: command '&quot;C:\Program files (x86)\microsoft Visual Studio 9.0\VC\BIN\cl.exe&quot; failed with exit status 2<br />
<br />
<br />
system specs.:<br />
  windows Vista home<br />
  64bit<br />
  python 2.6<br />
  <br />
<br />
I've tried everything I could think of to get it installed. But It keeps giving me the same error.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Tech B</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239530.html</guid>
		</item>
		<item>
			<title><![CDATA[Avogadro & Digital Sum]]></title>
			<link>http://www.daniweb.com/forums/thread239528.html</link>
			<pubDate>Wed, 18 Nov 2009 18:41:56 GMT</pubDate>
			<description><![CDATA[Hi I'm trying to find a way to find the first avogadro cipher whose digital sum exceeds 100, 
I've come to: 
 
#!/usr/bin/python 
 
def dig_sum(n): 
	lst = list(str(n)) 
	ln = len(lst) 
	sm = 0 
	while(i < ln):]]></description>
			<content:encoded><![CDATA[<div>Hi I'm trying to find a way to find the first avogadro cipher whose digital sum exceeds 100,<br />
I've come to:<br />
<br />
 <pre style="margin:20px; line-height:13px">#!/usr/bin/python<br />
<br />
def dig_sum(n):<br />
&nbsp; &nbsp; &nbsp; &nbsp; lst = list(str(n))<br />
&nbsp; &nbsp; &nbsp; &nbsp; ln = len(lst)<br />
&nbsp; &nbsp; &nbsp; &nbsp; sm = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; while(i &lt; ln):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sm += int(lst&#91;i&#93;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; return sm<br />
<br />
def avo(i,j,k,c):<br />
&nbsp; &nbsp; &nbsp; &nbsp; k = j<br />
&nbsp; &nbsp; &nbsp; &nbsp; j = i + j<br />
&nbsp; &nbsp; &nbsp; &nbsp; i = k<br />
&nbsp; &nbsp; &nbsp; &nbsp; arr.append(j)<br />
&nbsp; &nbsp; &nbsp; &nbsp; c += 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; print arr<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(dig_sum(i) &gt; 100):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;solved:&quot; + arr&#91;c&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; avo(i,j,k,c)<br />
<br />
i = 1 #num 1<br />
j = 1 #num 2<br />
k = 0 #reserve<br />
c = 1 #turns<br />
arr = &#91;i,j&#93;<br />
avo(i,j,k,c)</pre><br />
but it just stops working after it has printed 21 :o<br />
what have I done wrong?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Kruptein</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239528.html</guid>
		</item>
		<item>
			<title>Tiling an image in Python+PIL</title>
			<link>http://www.daniweb.com/forums/thread239523.html</link>
			<pubDate>Wed, 18 Nov 2009 18:17:15 GMT</pubDate>
			<description><![CDATA[Hey, guys! Newbie here. =) I'm trying to return an image that contains n^2 full size copies of my original image tiled, that makes an n-by-n square. I've been working on this for the past couple days and I am stuck. It's giving me an "image index out of range" error and I'm not even sure my code...]]></description>
			<content:encoded><![CDATA[<div>Hey, guys! Newbie here. =) I'm trying to return an image that contains n^2 full size copies of my original image tiled, that makes an n-by-n square. I've been working on this for the past couple days and I am stuck. It's giving me an &quot;image index out of range&quot; error and I'm not even sure my code will tile anything. Help?<br />
<br />
(Oh, and if my code doesn't show up tabbed in the correct spots, my orginal code has appropriate indentation. That I'm sure of.)<br />
<br />
 <pre style="margin:20px; line-height:13px">import Image<br />
<br />
def tile(img):<br />
&nbsp; &nbsp;  w,h=img.size<br />
&nbsp; &nbsp;  x=Image.new(&quot;RGB&quot;, (w*2, h*2))<br />
&nbsp; &nbsp;  m=0<br />
&nbsp; &nbsp;  n=0<br />
&nbsp; &nbsp; for r in range (n^2):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if r==0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  m==0<br />
&nbsp; &nbsp; &nbsp; &nbsp;  if r==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  m=w<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(w):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if r==0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n==0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if r==0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n==h<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for j in range (h):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p=img.getpixel((i,j))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x.putpixel((m, n), p)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n=n+1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m=m+1<br />
&nbsp; &nbsp; return x<br />
def main():<br />
&nbsp; &nbsp; filename=raw_input (&quot;Gimme a picture.&quot;)<br />
&nbsp; &nbsp; n=raw_input (&quot;How many times would you like it tiled?&quot;)<br />
&nbsp; &nbsp; img=Image.open(filename)<br />
&nbsp; &nbsp; tiled=tile(img)<br />
&nbsp; &nbsp; tiled.show()<br />
main()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>kleigh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239523.html</guid>
		</item>
		<item>
			<title><![CDATA[Why write both these 'import' lines?]]></title>
			<link>http://www.daniweb.com/forums/thread239521.html</link>
			<pubDate>Wed, 18 Nov 2009 18:04:22 GMT</pubDate>
			<description><![CDATA[The tkinter tutorial at tkdocs (http://www.tkdocs.com/tutorial/firstexample.html) shows these two lines at the beginning of every example. 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>The tkinter tutorial at tkdocs (<a rel="nofollow" class="t" href="http://www.tkdocs.com/tutorial/firstexample.html" target="_blank">http://www.tkdocs.com/tutorial/firstexample.html</a>) shows these two lines at the beginning of every example.<br />
 <pre style="margin:20px; line-height:13px">from tkinter import *<br />
from tkinter import ttk</pre><br />
Doesn't the first line import everything in the tkinter module? if so, why bother writing the second line?<br />
<br />
EDIT: Just found an answer (kind of ) on the same page.<br />
So I guess the real question would be &quot;what's the difference between  <pre style="margin:20px; line-height:13px">import tkinter *</pre> and  <pre style="margin:20px; line-height:13px">import tkinter</pre>&quot;</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>mahela007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239521.html</guid>
		</item>
		<item>
			<title>add signal handler in code</title>
			<link>http://www.daniweb.com/forums/thread239520.html</link>
			<pubDate>Wed, 18 Nov 2009 18:04:18 GMT</pubDate>
			<description>I have this program I wrote up and wanted to add signal handler to it. The thing is the example only show how to play with it but no to use in between methods. I tried coding it but it doesnt work 
 
 
 
import sys 
import signal 
import operator 
import stdpath 
import datetime 
from itertools...</description>
			<content:encoded><![CDATA[<div>I have this program I wrote up and wanted to add signal handler to it. The thing is the example only show how to play with it but no to use in between methods. I tried coding it but it doesnt work<br />
<br />
 <pre style="margin:20px; line-height:13px"><br />
import sys<br />
import signal<br />
import operator<br />
import stdpath<br />
import datetime<br />
from itertools import chain<br />
from eventlet import api<br />
from eventlet.db_pool import ConnectionPool as Connectlet<br />
from ConfigParser import *<br />
import sys<br />
import time<br />
from time import strftime<br />
<br />
<br />
class Checker(self):<br />
&nbsp; &nbsp; def __init__(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for route in config.options('MONITORS'):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; change_dict&#91;route&#93; = {}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if config.get('MONITORS', destination) == 'false':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; settimes = &#91;config.get('STARTTIME', destination), config.get('ENDTIME', destination)&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; change_dict&#91;route&#93;&#91;'times'&#93; = settimes<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; change_dict&#91;route&#93;&#91;'times'&#93; = &#91;&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; for key, value in change_dict.iteritems():<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'ch1'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'ch2'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'ch3'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'ech4'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'ch06'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'updatetime'&#93; = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  change_dict&#91;key&#93;&#91;'routename'&#93; = key<br />
&nbsp; &nbsp; &nbsp; &nbsp; api.spawn(self.refresh)<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; def refresh(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; while True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.publish(self.calling methodperiodically())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; api.sleep(25)&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; def handler(signum, frame):<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Signal handler called with signal', signum<br />
&nbsp; <br />
&nbsp;<br />
if __name__ == &quot;__main__&quot;:<br />
&nbsp; &nbsp; checker = Checker()<br />
&nbsp; &nbsp; checker.listen()&nbsp; <br />
&nbsp; &nbsp; while True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; try:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; signum = int(sys.argv&#91;1&#93;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; signal.signal(signum, onSignal) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ev.sleep(10000)<br />
&nbsp; &nbsp; &nbsp; &nbsp; except:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pass</pre><br />
Maybe I should try a smaller example of like a add or print method then try to kill the application? any suggestions? Thank you</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>msaenz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239520.html</guid>
		</item>
		<item>
			<title>Code Snippet A context to change current working directory.</title>
			<link>http://www.daniweb.com/code/snippet239496.html</link>
			<pubDate>Wed, 18 Nov 2009 16:28:45 GMT</pubDate>
			<description>This snippet defines a context to execute a block of statements in a different working directory (with the help of the with statement). After the block is exited, the initial working directory is restored, even if an exception has occurred in the with block.</description>
			<content:encoded><![CDATA[<div>This snippet defines a context to execute a block of statements in a different working directory (with the help of the with statement). After the block is exited, the initial working directory is restored, even if an exception has occurred in the with block.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Gribouillis</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239496.html</guid>
		</item>
		<item>
			<title>Array of objects</title>
			<link>http://www.daniweb.com/forums/thread239490.html</link>
			<pubDate>Wed, 18 Nov 2009 16:01:14 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I've dabbled in some programming in the past, but nothing serious.  I'm trying to create an array of objects in python 2.6 (VPython). 
 
What I want to do is create a 2d grid of sphere()'s.  But I want to be able to manipulate each one individually after they are created.  So what I would...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I've dabbled in some programming in the past, but nothing serious.  I'm trying to create an array of objects in python 2.6 (VPython).<br />
<br />
What I want to do is create a 2d grid of sphere()'s.  But I want to be able to manipulate each one individually after they are created.  So what I would like to end up with is a set of objects like:<br />
<br />
 <pre style="margin:20px; line-height:13px">ball1=sphere(x=x1, y=y1, z=0)<br />
ball2=sphere(x=x2, y=y2, z=0)<br />
..... etc.</pre><br />
My first thought was to do a nested pair of FOR loops<br />
 <pre style="margin:20px; line-height:13px">for i in range (0, 100):<br />
&nbsp; &nbsp;  for j in range (0, 100):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ballij=sphere(x=i, y=j, z=0)</pre>but I can't figure out how to set up the variable so that it creates a unique variable for each iteration that I can address each sphere.  Basically, I can't figure out how to set up &quot;ball<span style="font-style:italic"><span style="font-weight:bold">ij</span></span>&quot;.  Not sure if it's even possible in Python.  I've done it before in a specialized scripting language based in fortran though.<br />
<br />
So someone suggested using an array.  But I'm not sure how that would be set up.  If it was just an array of numbers, that would be simple, but not sure how to do this.<br />
<br />
Any ideas.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Vector_Joe</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239490.html</guid>
		</item>
		<item>
			<title>Stripping HTML tags</title>
			<link>http://www.daniweb.com/forums/thread239484.html</link>
			<pubDate>Wed, 18 Nov 2009 15:33:50 GMT</pubDate>
			<description><![CDATA[I'm trying to strip HTML tags and replace certain tags with newlines and tabs. I just can't figure out a function to do this, any ideas? I'd prefer to use regex instead of a library.]]></description>
			<content:encoded><![CDATA[<div>I'm trying to strip HTML tags and replace certain tags with newlines and tabs. I just can't figure out a function to do this, any ideas? I'd prefer to use regex instead of a library.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>ov3rcl0ck</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239484.html</guid>
		</item>
		<item>
			<title>Text File</title>
			<link>http://www.daniweb.com/forums/thread239462.html</link>
			<pubDate>Wed, 18 Nov 2009 13:51:21 GMT</pubDate>
			<description>I have a text file I am trying to manipulate, but the code is very long.  I know there is an easy way to do this by looping a few functiions.  My code is below but it is not complete.  I also have attached one of the text files.  There are generally 21 of these files.  They are always saved in the...</description>
			<content:encoded><![CDATA[<div>I have a text file I am trying to manipulate, but the code is very long.  I know there is an easy way to do this by looping a few functiions.  My code is below but it is not complete.  I also have attached one of the text files.  There are generally 21 of these files.  They are always saved in the same place and follow the format. &quot;mmddyy01&quot;  The 01 is the first text file for that day.  mmddyy is the date.  There are 3 files for each day.  This program takes text from the first file and manipulates it to be uploaded to the web.  I need to post a value for each hour of each day.  The first text file for the day covers 00:00-07:00 the second 07:00-11:00 and the third 11:00 to 24:00.  I have to do this for 7 days two times a week.  Here is my code so far.  Let me know if you have any questions,  I am sure I did not explain it correctly, so please ask.<br />
Thanks in advance,<br />
Joe<br />
 <pre style="margin:20px; line-height:13px">noline=0<br />
intFCITC_list = [] #Empty list where we will put all values of intFCITC<br />
for line in open('c:\\atc\\11180901.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FLP,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 6:00,11/18/2009 7:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 6:00,11/18/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 0:00,11/18/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 1:00,11/18/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 2:00,11/18/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 3:00,11/18/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 4:00,11/18/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 5:00,11/18/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 6:00,11/18/2009 7:00')<br />
for line in open('c:\\atc\\11180902.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 9:00,11/18/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 9:00,11/18/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 10:00,11/18/2009 11:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 10:00,11/18/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 7:00,11/18/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 8:00,11/18/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 9:00,11/18/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 10:00,11/18/2009 11:00')<br />
for line in open('c:\\atc\\11180903.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/18/2009 23:00,11/19/2009 00:00')<br />
if intFCITC_list[10]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 11:00,11/18/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 12:00,11/18/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 13:00,11/18/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 14:00,11/18/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 15:00,11/18/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 16:00,11/18/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 17:00,11/18/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 18:00,11/18/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 19:00,11/18/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 20:00,11/18/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 21:00,11/18/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 22:00,11/18/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/18/2009 23:00,11/19/2009 00:00')<br />
noline=0<br />
intFCITC_list = [] #Empty list where we will put all values of intFCITC<br />
for line in open('c:\\atc\\11190901.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FLP,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 6:00,11/19/2009 7:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 6:00,11/19/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 0:00,11/19/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 1:00,11/19/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 2:00,11/19/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 3:00,11/19/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 4:00,11/19/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 5:00,11/19/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 6:00,11/19/2009 7:00')<br />
for line in open('c:\\atc\\11190902.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 9:00,11/19/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 9:00,11/19/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 10:00,11/19/2009 11:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 10:00,11/19/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 7:00,11/19/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 8:00,11/19/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 9:00,11/19/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 10:00,11/19/2009 11:00')<br />
for line in open('c:\\atc\\11190903.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/19/2009 23:00,11/20/2009 00:00')<br />
if intFCITC_list[10]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 11:00,11/19/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 12:00,11/19/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 13:00,11/19/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 14:00,11/19/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 15:00,11/19/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 16:00,11/19/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 17:00,11/19/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 18:00,11/19/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 19:00,11/19/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 20:00,11/19/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 21:00,11/19/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 22:00,11/19/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/19/2009 23:00,11/20/2009 00:00')<br />
noline=0<br />
intFCITC_list = [] #Empty list where we will put all values of intFCITC<br />
for line in open('c:\\atc\\11200901.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FLP,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
for line in open('c:\\atc\\11200902.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 9:00,11/20/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 9:00,11/20/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
for line in open('c:\\atc\\11200903.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[10]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
noline=0<br />
intFCITC_list = [] #Empty list where we will put all values of intFCITC<br />
for line in open('c:\\atc\\11200901.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FLP,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 6:00,11/20/2009 7:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 0:00,11/20/2009 1:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 1:00,11/20/2009 2:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 2:00,11/20/2009 3:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 3:00,11/20/2009 4:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 4:00,11/20/2009 5:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 5:00,11/20/2009 6:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 6:00,11/20/2009 7:00')<br />
for line in open('c:\\atc\\11200902.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 9:00,11/20/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 9:00,11/20/200910:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 10:00,11/20/2009 11:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 7:00,11/20/2009 8:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 8:00,11/20/2009 9:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 9:00,11/20/2009 10:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 10:00,11/20/2009 11:00')<br />
for line in open('c:\\atc\\11200903.lis'):<br />
&nbsp; &nbsp; if noline==1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; fcitc=line[:9].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC = round(float(fcitc),1) #OP wants this to be integer.<br />
&nbsp; &nbsp; &nbsp; &nbsp; intFCITC_list.append(intFCITC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; limConst=line[29:79].strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
&nbsp; &nbsp; elif noline==2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; contDesc=line[90:137].strip() #Added subscripts. Don't want entire line.<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline=0<br />
&nbsp; &nbsp; if &quot;FCITC&quot; in line:<br />
&nbsp; &nbsp; &nbsp; &nbsp; noline+=1<br />
OUC2FPL=str(intFCITC_list[0])<br />
OUC2FPC=str(intFCITC_list[1])<br />
OUC2TEC=str(intFCITC_list[2])<br />
OUC2FPL=str(intFCITC_list[3])<br />
#Refer to any element by its index<br />
if intFCITC_list[0]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPL+,,,,,,,OUC,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[1]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2FPC+,,,,,,,OUC,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[2]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[3]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+OUC2TEC+,,,,,,,OUC,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[4]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPL,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPL2OUC+,,,,,,,FPL,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[5]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,FPC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+FPC2OUC+,,,,,,,FPC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[6]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,TEC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+TEC2OUC+,,,,,,,TEC,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[7]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2OUC+,,,,,,,RRI,OUC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[8]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPL+,,,,,,,RRI,FPL,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[9]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2FPC+,,,,,,,RRI,FPC,11/20/2009 23:00,11/21/2009 00:00')<br />
if intFCITC_list[10]&lt;0:<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write ('OUCT,0,,,,,,RRI,TEC,11/20/2009 23:00,11/21/2009 00:00')<br />
else:<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 11:00,11/20/2009 12:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 12:00,11/20/2009 13:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 13:00,11/20/2009 14:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 14:00,11/20/2009 15:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 15:00,11/20/2009 16:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 16:00,11/20/2009 17:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 17:00,11/20/2009 18:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 18:00,11/20/2009 19:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 19:00,11/20/2009 20:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 20:00,11/20/2009 21:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 21:00,11/20/2009 22:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 22:00,11/20/2009 23:00')<br />
&nbsp; &nbsp; f.write('OUCT,+RRI2TEC+,,,,,,,RRI,TEC,11/20/2009 23:00,11/21/2009 00:00')</pre><br />
<img src="/cgi-bin/mimetex.cgi? <br />
  PSS(R)MUST  9.2   -- Managing and Utilizing System Transmission --  MON, NOV 16 2009  14:17 &lt;FCM003.0&gt;<br />
 2008 FRCC LFDB - 40% LOAD<br />
 2009 SUMMER BASE<br />
Case.File   X:\2009 Studies\Weekly ATC Cases\ATC091116-18-24\OPCASE01.sav<br />
Subsys.File C:\Subsystem Files\Subsystem.sub<br />
Monit.File  C:\Monitor Files\monitor.mon<br />
Contin.File C:\Contingency Files\contingency.con<br />
Exclud.File C:\Exclude Files\exclude.exc<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 4<br />
 First violation      -      410.2 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To FPL_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     4 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   410.2  -0.30851  0.67627    5372 KIS ARP     69.0   5379 KIS CLAY    69.0 1  C:  2883 INTERCSN     230   5352 CAN ISL      230 1     440        5.5  -121.0 -0.02272   -10.2   -19.6<br />
                                                                                  Open   2883 INTERCSN     230   5352 CAN ISL      230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 5<br />
 First violation      -      406.7 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To PEF_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     5 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   406.7  -0.31117  0.67627    5372 KIS ARP     69.0   5379 KIS CLAY    69.0 1  C:  2883 INTERCSN     230   5352 CAN ISL      230 1     440        5.5  -121.0 -0.02063   -10.2   -18.6<br />
                                                                                  Open   2883 INTERCSN     230   5352 CAN ISL      230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 9<br />
 First violation      -     -172.1 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To TECO_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     9 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -172.1   0.13912  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.07771   510.3   496.9<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1509.2 MW.<br />
 <br />
Study transfer. From FPL_EXA             To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1509.2   0.30253  0.45554    5703 IND RIV      230   5705 STANTONE     230 1  C:  5703 IND RIV      230   5716 STANTONW     230 1     528      -24.6   432.0  0.20987   -18.6   298.1<br />
                                                                                  Open   5703 IND RIV      230   5716 STANTONW     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1371.1 MW.<br />
 <br />
Study transfer. From PEF_EXA             To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1371.1   0.33821 -0.32921    2167 WINDERME     230   5701 SO WOOD      230 1  C:  2581 ECON         230   2589 WTR PK E     230 1     415      -96.7   367.0  0.25606   -79.2   271.9<br />
                                                                                  Open   2581 ECON         230   2589 WTR PK E     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1472.7 MW.<br />
 <br />
Study transfer. From TECO_EXA            To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1472.7   0.31488 -0.32921    2167 WINDERME     230   5701 SO WOOD      230 1  C:  2581 ECON         230   2589 WTR PK E     230 1     415      -96.7   367.0  0.23916   -79.2   273.0<br />
                                                                                  Open   2581 ECON         230   2589 WTR PK E     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 1<br />
 First violation      -      994.6 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     1 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   994.6   0.45906  0.45554    5703 IND RIV      230   5705 STANTONE     230 1  C:  5703 IND RIV      230   5716 STANTONW     230 1     528      -24.6   432.0  0.31747   -18.6   297.1<br />
                                                                                  Open   5703 IND RIV      230   5716 STANTONW     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     -739.5 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To FPL_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -739.5   0.03238  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.01646   510.3   498.1<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 3<br />
 First violation      -      954.1 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To PEF_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     3 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   954.1  -0.13168 -0.52158    5706 AIP          230   5711 LK NONA      230 1  C:  5705 STANTONE     230   5712 MAGN RCH     230 1     534     -241.4  -367.0 -0.08589  -147.3  -229.3<br />
                                                                                  Open   5705 STANTONE     230   5712 MAGN RCH     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 6<br />
 First violation      -     -166.9 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To TECO_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     6 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -166.9   0.14345  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.08026   510.3   496.9<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
" alt=" <br />
  PSS(R)MUST  9.2   -- Managing and Utilizing System Transmission --  MON, NOV 16 2009  14:17 &lt;FCM003.0&gt;<br />
 2008 FRCC LFDB - 40% LOAD<br />
 2009 SUMMER BASE<br />
Case.File   X:\2009 Studies\Weekly ATC Cases\ATC091116-18-24\OPCASE01.sav<br />
Subsys.File C:\Subsystem Files\Subsystem.sub<br />
Monit.File  C:\Monitor Files\monitor.mon<br />
Contin.File C:\Contingency Files\contingency.con<br />
Exclud.File C:\Exclude Files\exclude.exc<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 4<br />
 First violation      -      410.2 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To FPL_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     4 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   410.2  -0.30851  0.67627    5372 KIS ARP     69.0   5379 KIS CLAY    69.0 1  C:  2883 INTERCSN     230   5352 CAN ISL      230 1     440        5.5  -121.0 -0.02272   -10.2   -19.6<br />
                                                                                  Open   2883 INTERCSN     230   5352 CAN ISL      230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 5<br />
 First violation      -      406.7 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To PEF_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     5 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   406.7  -0.31117  0.67627    5372 KIS ARP     69.0   5379 KIS CLAY    69.0 1  C:  2883 INTERCSN     230   5352 CAN ISL      230 1     440        5.5  -121.0 -0.02063   -10.2   -18.6<br />
                                                                                  Open   2883 INTERCSN     230   5352 CAN ISL      230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 9<br />
 First violation      -     -172.1 MW.<br />
 <br />
Study transfer. From FMPP_EXA            To TECO_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     9 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -172.1   0.13912  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.07771   510.3   496.9<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1509.2 MW.<br />
 <br />
Study transfer. From FPL_EXA             To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1509.2   0.30253  0.45554    5703 IND RIV      230   5705 STANTONE     230 1  C:  5703 IND RIV      230   5716 STANTONW     230 1     528      -24.6   432.0  0.20987   -18.6   298.1<br />
                                                                                  Open   5703 IND RIV      230   5716 STANTONW     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1371.1 MW.<br />
 <br />
Study transfer. From PEF_EXA             To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1371.1   0.33821 -0.32921    2167 WINDERME     230   5701 SO WOOD      230 1  C:  2581 ECON         230   2589 WTR PK E     230 1     415      -96.7   367.0  0.25606   -79.2   271.9<br />
                                                                                  Open   2581 ECON         230   2589 WTR PK E     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     1472.7 MW.<br />
 <br />
Study transfer. From TECO_EXA            To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  1472.7   0.31488 -0.32921    2167 WINDERME     230   5701 SO WOOD      230 1  C:  2581 ECON         230   2589 WTR PK E     230 1     415      -96.7   367.0  0.23916   -79.2   273.0<br />
                                                                                  Open   2581 ECON         230   2589 WTR PK E     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 1<br />
 First violation      -      994.6 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To FMPP_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     1 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   994.6   0.45906  0.45554    5703 IND RIV      230   5705 STANTONE     230 1  C:  5703 IND RIV      230   5716 STANTONW     230 1     528      -24.6   432.0  0.31747   -18.6   297.1<br />
                                                                                  Open   5703 IND RIV      230   5716 STANTONW     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 2<br />
 First violation      -     -739.5 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To FPL_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     2 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -739.5   0.03238  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.01646   510.3   498.1<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 3<br />
 First violation      -      954.1 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To PEF_IMA            . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     3 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
   954.1  -0.13168 -0.52158    5706 AIP          230   5711 LK NONA      230 1  C:  5705 STANTONE     230   5712 MAGN RCH     230 1     534     -241.4  -367.0 -0.08589  -147.3  -229.3<br />
                                                                                  Open   5705 STANTONE     230   5712 MAGN RCH     230 1<br />
 <br />
 Study transfer level -     1000.0 MW. Total violations: 6<br />
 First violation      -     -166.9 MW.<br />
 <br />
Study transfer. From IPP_REL_EXA         To TECO_IMA           . Transfer level -   1000.0 MW<br />
 <br />
 <br />
 Violations report ordered by transfer capability. Total     6 violations<br />
 <br />
 <br />
   FCITC       TDF     LODF &lt;---------     Limiting constraint      ---------&gt; &lt;---------     Contingency description      ---------&gt; Ncon    PreShift  Rating     PTDF IntBase FnlBase<br />
  -166.9   0.14345  0.72414    3518 BRKRIDGE     230   3520 BRKSVWTP     230 1  C:  3518 BRKRIDGE     230   3836 HUDSN        230 1     479      836.9   813.0  0.08026   510.3   496.9<br />
                                                                                  Open   3518 BRKRIDGE     230   3836 HUDSN        230 1<br />
" border="0" /></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Joe Hart</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239462.html</guid>
		</item>
		<item>
			<title>need help for project</title>
			<link>http://www.daniweb.com/forums/thread239363.html</link>
			<pubDate>Wed, 18 Nov 2009 06:10:32 GMT</pubDate>
			<description>hey this is my first time asking for help. But i am having trouble making this code. (i think i am over looking it) but here is what i need to do. 
::: Design and implement a program to maintain a simple income and expense 
budget for a non-profit organization. The organization runs a thrift shop...</description>
			<content:encoded><![CDATA[<div>hey this is my first time asking for help. But i am having trouble making this code. (i think i am over looking it) but here is what i need to do.<br />
::: Design and implement a program to maintain a simple income and expense<br />
budget for a non-profit organization. The organization runs a thrift shop that takes donations of salable goods<br />
and resells them for income. They also accept cash donations. Their expenses fall into 3 categories:<br />
operating (e.g., rent, utilities, etc.), payroll, and charity support. The program will maintain the amount of<br />
cash on hand as well as running totals for sales income, cash donations, operating expenses, payroll expenses,<br />
and support to charities. The program will allow a user to enter both income and expenses of each type, but<br />
expense payments may not exceed the available cash on hand at any time. The user will be able to request a<br />
report listing the totals for each of the expense categories, the total expenses, the total incomes from sales and<br />
donations, the total income, and the cash on hand.<br />
 <br />
<br />
sorry if it was so long but here is what i have so far:<br />
 <pre style="margin:20px; line-height:13px"># This program is a simple Non-Profit Budget Manager program that<br />
# allows a user to maintain a simple income and expense budget for<br />
# a non-profit organization.<br />
<br />
def main():<br />
&nbsp; &nbsp; endProgram = 'no'<br />
<br />
&nbsp; &nbsp; while 'no' == endProgram.lower():<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; print '1. Add an expense amount'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '2. Remove an expense amount'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '3. Add an income amount'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '4. Remove an income amount'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '5. Display the income and expense report'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '6. Exit the program'<br />
&nbsp; &nbsp; &nbsp; &nbsp; user_inp = raw_input( 'Enter your choice: ')<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if user_inp == '1':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addExpense()<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif user_inp == '2':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeExpense()<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif user_inp == '3':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addIncome()<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif user_inp '4':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeIncome()<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif user_inp == '5':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; displayBoth()<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'Are you sure?'</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gibson8720</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239363.html</guid>
		</item>
		<item>
			<title><![CDATA["CrashLanding" text adventure(problem need solving)]]></title>
			<link>http://www.daniweb.com/forums/thread239333.html</link>
			<pubDate>Wed, 18 Nov 2009 02:46:56 GMT</pubDate>
			<description><![CDATA[def Myfunc(): 
print "Stuff" 
#Title: "CrashLanding" 
#By: Python User 
#November 16, 2009 
#Features improved coding style, or at least I think so 
#note:code based on J.G.S'S code-I really learned alot from his code Some credit goes to him 
#note:I dont think that is his actual username so keep...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">def Myfunc():<br />
print &quot;Stuff&quot;<br />
#Title: &quot;CrashLanding&quot;<br />
#By: Python User<br />
#November 16, 2009<br />
#Features improved coding style, or at least I think so<br />
#note:code based on J.G.S'S code-I really learned alot from his code Some credit goes to him<br />
#note:I dont think that is his actual username so keep that in mind<br />
#Can you guys please look over my code? Is it a good coding style? Like i said, its based<br />
#of off J.G.S'S code as i am rather inexp...this is my first real text adventure<br />
#note:crystals same as gold, only i wanted to have a different name for the currency<br />
crystals = 0<br />
gotCrystals_cell=0<br />
gotCrystals_sewer=0<br />
gotCrystals_lair=0<br />
gotCrystals_caves=0<br />
gotCrystals_cavelake=0<br />
<br />
crystals_found1=0<br />
crystals_found2=0<br />
crystals_found3=0<br />
crystals_found4=0<br />
crystals_found5=0<br />
dust_movedlair=0<br />
<br />
def pass1():<br />
&nbsp; &nbsp; print 'you posess', crystals, 'crystals'<br />
&nbsp; &nbsp; prompt_cell()<br />
def pass2():<br />
&nbsp; &nbsp; print 'you posess', crystals, 'crystals.'<br />
&nbsp; &nbsp; prompt_sewer()<br />
def pass3():<br />
&nbsp; &nbsp; print 'you posess', crystals, 'crystals.'<br />
&nbsp; &nbsp; prompt_lair()<br />
<br />
<br />
def help1():<br />
&nbsp; &nbsp; print '''The following is the list of commands that you can make.<br />
&nbsp; &nbsp; commands should be written in lowercase font only. north, south, east, west, look(object), look inside(object), help, get(item), use(item), talk(npc), use ship(endgame)'''<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; pass1()<br />
def help2():<br />
&nbsp; &nbsp; print '''The following is the list of commands that you can make.<br />
&nbsp; &nbsp; commands should be written in lowercasef only. north, south, east, west, look(object), look inside(object), help, get(item), use(item), talk(npc),&nbsp; use ship(endgame)'''<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; pass2()<br />
def help3():<br />
&nbsp; &nbsp; print '''The following is the list of commands that you can make.<br />
&nbsp; &nbsp; commands should be written in lowercasef only. north, south, east, west, look(object), look inside(object), help, get(item), use(item), talk(npc), use ship(endgame)'''<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; pass3()<br />
def help4():<br />
&nbsp; &nbsp; print '''The following is the list of commands that you can make.<br />
&nbsp; &nbsp; commands should be written in lowercasef only. north, south, east, west, look(object), look inside (object), help, get(item), use(item), talk(npc), use ship(endgame)'''<br />
&nbsp; &nbsp; print<br />
&nbsp; &nbsp; pass4()<br />
def help5():<br />
&nbsp; &nbsp; print '''The following is the list of commands that you can make.<br />
&nbsp; &nbsp; commands should be written in lowercasef only. north, south, east, west, look(object), look inside(object), help, get(item), use(item), talk(npc), use ship(endgame)'''<br />
&nbsp; &nbsp; pass5()<br />
<br />
def began():<br />
&nbsp; &nbsp; print '''You awake to a sudden pain in your side. Looking around, you see that you are inside a dimly lit cell.<br />
You were supposed to be part of a raiding party on Earth but were shot down over City012.<br />
The last thing you remeber before you blacked out was that you saw your ship crashland into the side of a mountain.<br />
If your lucky, your ship could still be flyable thanks to shield technology. But what matters you most is escaping<br />
this cell.<br />
<br />
Your ship is powerd by purple cyrstals found naturally on your homeworld.<br />
In order to fly the ship, you'll have to find 30 of them. Unfortunly for you,<br />
the humans most likly took all of them in order to study and then reverse engineer them to power their machines.<br />
Remember, you still have to find the ship before you can put the 30 crystals to good use.'''<br />
&nbsp; &nbsp; cell()<br />
<br />
def cell():<br />
&nbsp; &nbsp; print 'you posess', crystals, 'crystals'<br />
&nbsp; &nbsp; print '''Upon studying your cell futher, through the blanket of darkness you can make out a note lying on the ground and a bunkbed.To the north is a sewer,<br />
to the south is a group of caves below the cell connected by a hidden floor door.'''<br />
&nbsp; &nbsp; prompt_cell()<br />
def prompt_cell():<br />
&nbsp; &nbsp; global crystals<br />
&nbsp; &nbsp; global gotCystals_cell<br />
&nbsp; &nbsp; global gold_found1<br />
&nbsp; &nbsp; prompt_cell = raw_input('&gt;')<br />
&nbsp; &nbsp; if prompt_cell == 'north':<br />
&nbsp; &nbsp; &nbsp; &nbsp; sewer_room()<br />
&nbsp; &nbsp; elif prompt_cell == 'south':<br />
&nbsp; &nbsp; &nbsp; &nbsp; hiddendoor_room()<br />
&nbsp; &nbsp; elif prompt_cell == 'north':<br />
&nbsp; &nbsp; &nbsp; &nbsp; caves()<br />
&nbsp; &nbsp; elif prompt_cell == 'look note':<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '''you pick up the note and began to read: If anyone is reading this,I stashed some loot in the bunkbed up against the wall. Don't ask how<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  I obtained them, but anyone who finds all 30 crystals meet me at once<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  inside a hidden cave network underneath this facility.'''<br />
&nbsp; &nbsp; elif prompt_cell=='help':<br />
&nbsp; &nbsp; &nbsp; &nbsp; help1()<br />
&nbsp; &nbsp; elif prompt_cell == 'look inside bunkbed':<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '''you lift up the mattress on the bunkbed and as the note clearly stated, you find 5 crystals underneath'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; gold_found1 = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; pass1()<br />
<br />
&nbsp; &nbsp; if prompt_cell == 'get crystals':<br />
&nbsp; &nbsp; #this code will not run. i got this error from the program:<br />
&nbsp; &nbsp; #line 101, in prompt_cell UnboundLocalError: local variable 'gotCrystals_cell' referenced before assignmen&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  if gotCrystals_cell == 0 and crystals_found1 == 1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '''You get the gold that was under the mattress of the bunkbed.'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gold = crystals+5<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gotCrystals_cell = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pass1()<br />
&nbsp; &nbsp; &nbsp; &nbsp;  elif gotCrystals_cell == 0 and crystals_found1 == 0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '''You don't see any crystals.'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pass1()<br />
&nbsp; &nbsp; &nbsp; &nbsp;  elif gotCrystals_cell == 1 and crystals_found1 == 1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '''You do know you already have the crystals, right?'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pass1()<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '''I don't know how to perform that.'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; pass1()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
#I'm going to add the four other rooms and other code later, im burnt after all this typing.<br />
#I hope to add more commands and more layers of difficulty,<br />
#like i want to hide the space ship in several objects, more roms, etc<br />
#but that will have to wait<br />
#began the game:<br />
began()</pre><br />
I need help near the end of my code. Something about an unboundlocalerror. Can you guys look through my code and see if i did <br />
<br />
something wrong: this is the &quot;offending&quot; code i think: if gotCrystals_cell == 0 and crystals_found1 == 1:<br />
<br />
At first i thought it was the spaces i made but that was not it.<br />
Spent like 40 minutes rewriting it before becoming completly<br />
stumped. <br />
<br />
The rest of the code was OK, though.<br />
<br />
Much appreciated,<br />
Python User</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python user</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239333.html</guid>
		</item>
		<item>
			<title>How to pass data from a Thread to Another? (GUI)</title>
			<link>http://www.daniweb.com/forums/thread239303.html</link>
			<pubDate>Tue, 17 Nov 2009 22:45:06 GMT</pubDate>
			<description><![CDATA[Sorry to bother again:) but im new to Python and to OOP. 
I made a simple sniffer application (thanks to your help) which prints the sniffed data on the console. I want to extend it giving it a GUI using PyQt4. I also made an argument "--nogui" that the user can give to stay just on the console. 
...]]></description>
			<content:encoded><![CDATA[<div>Sorry to bother again:) but im new to Python and to OOP.<br />
I made a simple sniffer application (thanks to your help) which prints the sniffed data on the console. I want to extend it giving it a GUI using PyQt4. I also made an argument &quot;--nogui&quot; that the user can give to stay just on the console.<br />
<br />
So I made the method <span style="font-weight:bold">def gui_callback(self, data)</span> on the sniffer thread to pass the data on the gui class' &quot;window&quot; object, where the method <span style="font-weight:bold">def callbackSetText(self, data)</span> has to be called somehow.<br />
<br />
What am i supposed to put on the <span style="font-weight:bold"><span style="text-decoration:underline">def gui_callback(self, data):</span></span>??<br />
<br />
<span style="text-decoration:underline"><span style="font-weight:bold">test.py</span></span><br />
 <pre style="margin:20px; line-height:13px">import sys<br />
from threading import Thread<br />
from scapy.all import sniff<br />
from PyQt4 import QtCore, QtGui<br />
from testgui_ui import Ui_GuiForm<br />
<br />
class SnifferThread(Thread):<br />
&nbsp; &nbsp; def __init__ (self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; Thread.__init__(self)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.filter = &quot;tcp port 80&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.timeToStop = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.havegui = False<br />
<br />
&nbsp; &nbsp; def HaveGui(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.havegui = True<br />
<br />
&nbsp; &nbsp; def run(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;Sniffer started...&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sniff(filter=self.filter, prn=self.pkt_callback, stopperTimeout=0.1, stopper=self.timeToStopChecker, store=0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; def stop(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;Sniffer stoping...&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.timeToStop = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; def timeToStopChecker(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; return self.timeToStop<br />
<br />
&nbsp; &nbsp; def gui_callback(self, data):<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;Sending data to GUI...&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #What am i supposed to put in here??<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; def pkt_callback(self,pkt):<br />
&nbsp; &nbsp; &nbsp; &nbsp; data = pkt.sprintf('%IP.src% &gt; %IP.dst%')<br />
&nbsp; &nbsp; &nbsp; &nbsp; print data<br />
&nbsp; &nbsp; &nbsp; &nbsp; if self.havegui : self.gui_callback(data)<br />
<br />
class GuiForm(QtGui.QMainWindow):<br />
&nbsp; &nbsp; def __init__(self, parent=None):<br />
&nbsp; &nbsp; &nbsp; &nbsp; QtGui.QWidget.__init__(self, parent)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.ui = Ui_GuiForm()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.ui.setupUi(self)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; def callbackSetText(self, data):<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Receiving data from sniffer thread<br />
&nbsp; &nbsp; &nbsp; &nbsp; #and puting them in a textedit widget<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.ui.textedit.setText(data)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
def terminateSnifferThread():<br />
&nbsp; &nbsp; sniffer.stop()<br />
&nbsp; &nbsp; sniffer.join()<br />
<br />
if __name__ == '__main__':<br />
&nbsp; &nbsp; sniffer = SnifferThread()<br />
&nbsp; &nbsp; sniffer.start()<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; if not &quot;--nogui&quot; in sys.argv[1:]:<br />
&nbsp; &nbsp; &nbsp; &nbsp; app = QtGui.QApplication([])<br />
&nbsp; &nbsp; &nbsp; &nbsp; window = GuiForm()<br />
&nbsp; &nbsp; &nbsp; &nbsp; window.show()<br />
&nbsp; &nbsp; &nbsp; &nbsp; sniffer.HaveGui()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; app.exec_()<br />
&nbsp; &nbsp; &nbsp; &nbsp; terminateSnifferThread()<br />
<br />
&nbsp; &nbsp; try:<br />
&nbsp; &nbsp; &nbsp; &nbsp; while(sniffer.timeToStop != True): pass<br />
&nbsp; &nbsp; except KeyboardInterrupt:<br />
&nbsp; &nbsp; &nbsp; &nbsp; terminateSnifferThread()</pre><br />
I think its simple enough. I just want to call a method from one class' object to another one on a different thread.<br />
Here is the ui code if someone want to test it out.<br />
<br />
<span style="font-weight:bold"><span style="text-decoration:underline">testgui_ui.py</span></span><br />
 <pre style="margin:20px; line-height:13px"># -*- coding: utf-8 -*-<br />
<br />
# Form implementation generated from reading ui file 'testgui.ui'<br />
#<br />
# Created: Wed Nov 18 00:35:47 2009<br />
#&nbsp; &nbsp; &nbsp; by: PyQt4 UI code generator 4.6<br />
#<br />
# WARNING! All changes made in this file will be lost!<br />
<br />
from PyQt4 import QtCore, QtGui<br />
<br />
class Ui_GuiForm(object):<br />
&nbsp; &nbsp; def setupUi(self, GuiForm):<br />
&nbsp; &nbsp; &nbsp; &nbsp; GuiForm.setObjectName(&quot;GuiForm&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; GuiForm.resize(381, 324)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.centralwidget = QtGui.QWidget(GuiForm)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.centralwidget.setObjectName(&quot;centralwidget&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.gridLayout = QtGui.QGridLayout(self.centralwidget)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.gridLayout.setObjectName(&quot;gridLayout&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.textedit = QtGui.QTextEdit(self.centralwidget)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.textedit.setReadOnly(True)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.textedit.setObjectName(&quot;textedit&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.gridLayout.addWidget(self.textedit, 0, 0, 1, 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; GuiForm.setCentralWidget(self.centralwidget)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.retranslateUi(GuiForm)<br />
&nbsp; &nbsp; &nbsp; &nbsp; QtCore.QMetaObject.connectSlotsByName(GuiForm)<br />
<br />
&nbsp; &nbsp; def retranslateUi(self, GuiForm):<br />
&nbsp; &nbsp; &nbsp; &nbsp; GuiForm.setWindowTitle(QtGui.QApplication.translate(&quot;GuiForm&quot;, &quot;myGUI&quot;, None, QtGui.QApplication.UnicodeUTF8))</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>kapcom01</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239303.html</guid>
		</item>
		<item>
			<title>Problem with threads....</title>
			<link>http://www.daniweb.com/forums/thread239296.html</link>
			<pubDate>Tue, 17 Nov 2009 22:13:19 GMT</pubDate>
			<description>Hi guys, 
 
I am trying to create a python chat server. So far, it has been going well but a problem has come up with threading. 
 
The threading for incoming connections works fine (in the listen_and_accept function). Since I would like to be able to type in commands in the server terminal window,...</description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
<br />
I am trying to create a python chat server. So far, it has been going well but a problem has come up with threading.<br />
<br />
The threading for incoming connections works fine (in the listen_and_accept function). Since I would like to be able to type in commands in the server terminal window, I though I would start two threads, one calling the command_line function and one to call the listen_and_accept funtion (which in turn would create threads for the incoming connections).<br />
<br />
For some reason this. doesn't work. Could it be the indented threading? (Output from running the server (not much) is below). All the rest works fine so far...<br />
<br />
Edit: Output is below. I know the code must look pretty stupid to you, but I am just getting started (a few days), any of-topic tips would also be greatly appreciated!<br />
<br />
Thanks!<br />
<br />
Code:<br />
<br />
 <pre style="margin:20px; line-height:13px">#!/usr/bin/env python<br />
<br />
#########################################################<br />
# Chat (client or server)<br />
#########################################################<br />
#<br />
#&nbsp; &nbsp; &nbsp; &nbsp; Author: Oliver Stollmann<br />
#&nbsp; &nbsp; &nbsp; &nbsp; Date: 17.11.09<br />
#<br />
<br />
import thread, sys, time<br />
import socket as s<br />
<br />
print &quot;---------------------------------------------------&quot;<br />
<br />
# Check for valid call<br />
if sys.argv.__len__() == 3:<br />
&nbsp; &nbsp; &nbsp; &nbsp; type = 'SERVER'<br />
elif sys.argv.__len__() == 4:<br />
&nbsp; &nbsp; &nbsp; &nbsp; type = 'CLIENT'<br />
else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; sys.exit(&quot;Error! Usage: %s server:[name port], client:[nick_name host port]&quot; % sys.argv[0])<br />
<br />
class chat_server:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def __init__(self, server_name, server_port, socket=None):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''Constructor'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Chat server name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self._SERVER_NAME = server_name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Chat server port<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self._SERVER_PORT = int(server_port)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Chat server IP<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self._SERVER_IP = s.gethostbyname(s.gethostname())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Socket: new/existing?<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if socket is None:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.socket = s.socket(s.AF_INET, s.SOCK_STREAM)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.socket = socket<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # clients[[socket, ip, id, name]]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.clients = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Bind to socket<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.bind(self._SERVER_IP, self._SERVER_PORT)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Server commands thread<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thread.start_new_thread(self.command_line, ('a','b')) # &lt;---------- THIS ISNT THE PROBLEM (I think)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Listen thread<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thread.start_new_thread(self.listen_and_accept,('a', 'b')) # &lt;---------- THIS IS THE PROBLEM (I think)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def command_line(a,b,c):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; input = raw_input('&gt; ')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print input<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def bind(self, host, port):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''Socket bind'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.socket.bind((host, port))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; except s.error:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sys.exit(&quot;Error! Could not bind.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def listen_and_accept(self, a):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.socket.listen(5)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''listen for accept() requests'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Listening (&quot; + str(self._SERVER_IP) + &quot;:&quot; + str(self._SERVER_PORT) + &quot;)...&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_socket, c_address = self.socket.accept()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_ip = c_address[0]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_id = c_address[1]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_name = c_socket.recv(1024)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.add_client(c_socket, c_ip, c_id, c_name)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'New user: ' + str(c_name) + '@' + str(c_ip)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thread.start_new_thread(self.handle, (c_socket, c_ip, c_id, c_name))<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def handle(self, c_socket, c_ip, c_id, c_name):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''handle client'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'New thread for user: ' + str(c_name) + '@' + str(c_ip)<br />
#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time.sleep(2)<br />
#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thread.exit()<br />
#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'Thread closed!'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data = c_socket.recv(1024)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if data == 'quit()':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_socket.send('GoodBye!')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'User', str(c_ip), 'hast left the chat!'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thread.exit()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.send(c_ip, c_id, c_name, data)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def add_client(self, c_socket, c_ip, c_id, c_name):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''add client'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_client = [c_socket, c_ip, c_id, c_name]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.clients.append(new_client)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def remove_client(self, c_ip, c_id, c_name):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''remove client'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for i in range(self.clients.__len__()):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if self.clients[i][1] == c_ip and self.clients[i][2] == c_id and self.clients[i][3] == c_name:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.clients.remove(self.clients[i])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return t<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def check_client(self, c_ip, c_id, c_name):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''check client'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for i in range(self.clients.__len__()):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if self.clients[i][1] == c_ip and self.clients[i][2] == c_id and self.clients[i][3] == c_name:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c = client[i]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return c<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def send(self, c_ip, c_id, c_name, data):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''Send message'''<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for client in self.clients:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if client[1] != c_ip or client[2] != c_id or client[3] != c_name:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # message body<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client[0].send(data)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print 'Message from', str(c_ip), 'sent:', str(data)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def details(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '''Server details'''&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Chat Server details:&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&nbsp; name:&quot;, self._SERVER_NAME<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&nbsp; IP:&quot;, self._SERVER_IP<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&nbsp; port&quot;, self._SERVER_PORT<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def quit(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.socket.close()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
server1 = chat_server(sys.argv[1], sys.argv[2])<br />
<br />
################<br />
#&nbsp; &nbsp; &nbsp; &nbsp; output:<br />
#<br />
#&nbsp; &nbsp; &nbsp; &nbsp; mbp1:final mbp1$ python chat_server.py test 2408<br />
#&nbsp; &nbsp; &nbsp; &nbsp; ---------------------------------------------------<br />
#&nbsp; &nbsp; &nbsp; &nbsp; mbp1:final mbp1$</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>o891</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239296.html</guid>
		</item>
		<item>
			<title>Skinning wxPython Application</title>
			<link>http://www.daniweb.com/forums/thread239269.html</link>
			<pubDate>Tue, 17 Nov 2009 20:37:44 GMT</pubDate>
			<description>Hi All, 
is there a trick in wxPython to skin application to look like this one? 
What are pros and cons if any? 
Take a look Here (http://www.fileguru.com/images/b/audio_recording_studio_multimedia_sound_tools-5778.gif) 
 
Cheers :)</description>
			<content:encoded><![CDATA[<div>Hi All,<br />
is there a trick in wxPython to skin application to look like this one?<br />
What are pros and cons if any?<br />
Take a look <a rel="nofollow" class="t" href="http://www.fileguru.com/images/b/audio_recording_studio_multimedia_sound_tools-5778.gif" target="_blank">Here</a><br />
<br />
Cheers :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>evstevemd</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239269.html</guid>
		</item>
		<item>
			<title>Code Snippet Connect 4 - make_board</title>
			<link>http://www.daniweb.com/code/snippet239252.html</link>
			<pubDate>Tue, 17 Nov 2009 18:54:50 GMT</pubDate>
			<description>Hi Folks 
 
the game runs. jippie, but i have a small problem 
 
i cant get the board to get drawn from left to right, its drawn from upwards to downwards 
 
hope anyone can help me 
 
Sincerly 
elomanias</description>
			<content:encoded><![CDATA[<div>Hi Folks<br />
<br />
the game runs. jippie, but i have a small problem<br />
<br />
i cant get the board to get drawn from left to right, its drawn from upwards to downwards<br />
<br />
hope anyone can help me<br />
<br />
Sincerly<br />
elomanias</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>elomanias</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239252.html</guid>
		</item>
		<item>
			<title>Connect 4 - Game ends in Draw</title>
			<link>http://www.daniweb.com/forums/thread239248.html</link>
			<pubDate>Tue, 17 Nov 2009 18:30:56 GMT</pubDate>
			<description><![CDATA[Hi Peepz, 
 
My Connect 4 board is made up of different lists. My task is to write a function that checks whether the game ends in a draw (that means when every spot is taken by a 'X' or an 'O' without fulfilling the winning requirements 
If everyspot is filled print 'Draw!' 
 
The easiest way I...]]></description>
			<content:encoded><![CDATA[<div>Hi Peepz,<br />
<br />
My Connect 4 board is made up of different lists. My task is to write a function that checks whether the game ends in a draw (that means when every spot is taken by a 'X' or an 'O' without fulfilling the winning requirements<br />
If everyspot is filled print 'Draw!'<br />
<br />
The easiest way I could imagine is to check whether the first row of the board is fully filled (that means the spaces beneath the top row are filled too)<br />
<br />
Unfortunately this time I don't have a clue how to type this down ...<br />
<br />
Can anyone help me please?<br />
<br />
Thanks in advance<br />
<br />
Yours Truly</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sentinel123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239248.html</guid>
		</item>
		<item>
			<title>django manytomanyfield usage</title>
			<link>http://www.daniweb.com/forums/thread239229.html</link>
			<pubDate>Tue, 17 Nov 2009 16:22:58 GMT</pubDate>
			<description><![CDATA[Hi all, 
Im trying to add tags to my blog post. i did it its done but i wanted more so when users click the link of tag, they will see other post tagged same. anyway 
 
here my view_tag function 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hi all,<br />
Im trying to add tags to my blog post. i did it its done but i wanted more so when users click the link of tag, they will see other post tagged same. anyway<br />
<br />
here my view_tag function<br />
 <pre style="margin:20px; line-height:13px">def view_tag(request, tag_id):<br />
&nbsp; &nbsp; &nbsp; &nbsp; tag = Tag.objects.get(pk=tag_id)<br />
&nbsp; &nbsp; &nbsp; &nbsp; news = tag.pnews_set.all()<br />
&nbsp; &nbsp; &nbsp; &nbsp; return render_to_response(&quot;tags.html&quot;, {&quot;tag_id&quot;:tag_id, &quot;news&quot;:news, &quot;tag&quot;:tag})</pre><br />
my problem is i cant load any value at the template i saw at example he just write <br />
 <pre style="margin:20px; line-height:13px">{{news.name}}</pre> and saw the result but i can. <br />
when i write <br />
 <pre style="margin:20px; line-height:13px">{{tag.pnews_set.all}}</pre>i can see these<br />
 <pre style="margin:20px; line-height:13px">[&lt;pnews: Sitemiz Test Yayınında&gt;, &lt;pnews: Deneme Yazısı&gt;]</pre>but i want to use something like this:<br />
 <pre style="margin:20px; line-height:13px">{%for pnews in news%}<br />
{{pnews.name}}<br />
{%endfor%}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>mhangman</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239229.html</guid>
		</item>
		<item>
			<title>Beginner Q: dicts of class instances containing dicts...</title>
			<link>http://www.daniweb.com/forums/thread239201.html</link>
			<pubDate>Tue, 17 Nov 2009 13:08:29 GMT</pubDate>
			<description><![CDATA[I'm having trouble understanding why I can't seem to access a dict object of a class once the class instance is referenced through a dict of instances. If that makes sense at all ;) 
 
I have a simple class containing only a dict called index. 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>I'm having trouble understanding why I can't seem to access a dict object of a class once the class instance is referenced through a dict of instances. If that makes sense at all ;)<br />
<br />
I have a simple class containing only a dict called index.<br />
 <pre style="margin:20px; line-height:13px">class Node:<br />
&nbsp; &nbsp; def __init__(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.index = {}</pre>I'm creating a dict of nodes by name, in this case the name is a number string.<br />
 <pre style="margin:20px; line-height:13px">&nbsp; &nbsp; INFILES = [&quot;log.csv&quot;]<br />
&nbsp; &nbsp; INNODES = [&quot;2&quot;,&quot;3&quot;]<br />
&nbsp; &nbsp; INPARAMS = [&quot;v&quot;,&quot;g&quot;]<br />
&nbsp; &nbsp; nodes = {}<br />
&nbsp; &nbsp; for nodestr in INNODES: #create dict of nodes<br />
&nbsp; &nbsp; &nbsp; &nbsp; newnode = Node()<br />
&nbsp; &nbsp; &nbsp; &nbsp; print nodestr<br />
&nbsp; &nbsp; &nbsp; &nbsp; print newnode<br />
&nbsp; &nbsp; &nbsp; &nbsp; print newnode.index<br />
&nbsp; &nbsp; &nbsp; &nbsp; nodes[nodestr] = [newnode]<br />
&nbsp; &nbsp; for n in nodes:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print n<br />
&nbsp; &nbsp; &nbsp; &nbsp; print nodes[n]<br />
&nbsp; &nbsp; &nbsp; &nbsp; print nodes[n].index</pre>But when I print out the index after adding to the dict I get a reference to a list object not the original dict.<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  2<br />
&lt;myModule.Node instance at 0xb7e46bcc&gt;<br />
{}<br />
3<br />
&lt;myModule.Node instance at 0xb7e46d0c&gt;<br />
{}<br />
3<br />
[&lt;myModule.Node instance at 0xb7e46d0c&gt;]<br />
&lt;built-in method index of list object at 0xb7e4622c&gt;<br />
2<br />
[&lt;myModule.Node instance at 0xb7e46bcc&gt;]<br />
&lt;built-in method index of list object at 0xb7e4654c&gt;  <hr /> </td> </tr> </table> </div>I must be missing something :(</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>twoshots</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239201.html</guid>
		</item>
		<item>
			<title>wxpython display image</title>
			<link>http://www.daniweb.com/forums/thread239191.html</link>
			<pubDate>Tue, 17 Nov 2009 12:08:22 GMT</pubDate>
			<description><![CDATA[hi, 
 
Please could you help me with displaying the png image file I am saving. I want it to display just after it is saved so within the same function onPLOT 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>hi,<br />
<br />
Please could you help me with displaying the png image file I am saving. I want it to display just after it is saved so within the same function onPLOT<br />
 <pre style="margin:20px; line-height:13px">import wx<br />
import cx_Oracle<br />
import datetime<br />
import wx.grid<br />
import csv<br />
import numpy as np<br />
import matplotlib.pyplot as plt<br />
import matplotlib.mlab as mlab<br />
import matplotlib.ticker as ticker <br />
import cStringIO<br />
<br />
class MainWindow(wx.Panel):<br />
&nbsp; &nbsp; def __init__(self,parent,id):<br />
&nbsp; &nbsp; &nbsp; &nbsp; wx.Panel.__init__(self,parent,id)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.background = wx.Panel(self)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; lblHeader = wx.StaticText(self,-1,label='PERF CALCULATION',pos=(100,10),style=wx.ALIGN_CENTER)<br />
&nbsp; &nbsp; &nbsp; &nbsp; font = wx.Font(15,wx.BOLD,wx.NORMAL,wx.ITALIC)<br />
&nbsp; &nbsp; &nbsp; &nbsp; lblHeader.SetFont(font)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; lblComboBox = wx.StaticText(self,-1,label='Fund_id:',pos=(5,65))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Fund_id = wx.ComboBox(self, -1, pos=(120,60), size=(100,25), choices=['gip'], style=wx.CB_DROPDOWN)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; lblStartDate = wx.StaticText(self, -1, label='Start_date:', pos=(5,105))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.StartDate = wx.TextCtrl(self, -1, pos=(120,100), size=(100,25))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; lblEndDate = wx.StaticText(self,-1,label='End_date:',pos=(5,145))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.EndDate=wx.TextCtrl(self,-1,pos=(120,140),size=(100,25))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.myButton = wx.Button(self, label='Execute', pos=(50,200), size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON,self.OnExecute,id= self.myButton.GetId())<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; self.myButton = wx.Button(self, label='Display', pos=(200,200), size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON,self.OnDisplay,id= self.myButton.GetId())<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Exit = wx.Button(self, label='Exit', pos=(350,200), size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON, self.OnExit, id=self.Exit.GetId())<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Clear = wx.Button(self,label='Clear',pos=(500,200),size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON,self.OnClear,id=self.Clear.GetId())<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Export = wx.Button(self,label='CSV Export',pos=(650,200),size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON,self.OnExport,id=self.Export.GetId())<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Plot = wx.Button(self,label='Plot Return',pos=(800,200),size=(100,35))<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Bind(wx.EVT_BUTTON,self.OnPlot,id=self.Plot.GetId())<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; font1 = wx.Font(8,wx.MODERN,wx.NORMAL, wx.NORMAL, False)<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.transferArea = wx.TextCtrl(self, pos=(20,250),size= (1200,600),style = wx.TE_READONLY |wx.TE_LEFT | wx.TE_MULTILINE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.transferArea.SetFont(font1)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; self.dbresult = ''<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; def OnExecute(self,event):<br />
&nbsp; &nbsp; &nbsp;  # try:<br />
&nbsp; &nbsp; &nbsp; &nbsp; if self.dbresult != '':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return self.result<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; #&nbsp;  All the rest below<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; connection = cx_Oracle.connect('/DB)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor = connection.cursor()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fund_id = self.Fund_id.GetValue()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print fund_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_date = self.StartDate.GetValue()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print start_date<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_date = self.EndDate.GetValue()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print end_date<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql =&quot;&quot;&quot;MY SQL&quot;&quot;&quot;% (str(start_date),str(end_date),str(fund_id))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor.execute(sql) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for line in cursor:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = [str(entry) for entry in line]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.append(line)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.result = result<br />
<br />
<br />
&nbsp; &nbsp; def OnDisplay(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; myheaderformat = &quot;%-20s %-22s %-22s %-15s %-20s %13s %15s %12s&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; myreportformat = &quot;%-20s %-22s %-22s %-15s %-20s %13s %15s %12s&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; header = myheaderformat % ('DATE','FUND_ID','STRATEGY','INSTRUMENT','SECTOR','PNL$M','NAV','PERFPCT')<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.transferArea.WriteText(str(header+&quot;\n&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(len(self.result)):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myline = myreportformat % (self.result[i][0][0:-9],self.result[i][1],self.result[i][2],self.result[i][3],self.result[i][4],self.result[i][5],self.result[i][6],self.result[i][7])<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.transferArea.WriteText(myline+&quot;\n&quot;)<br />
<br />
<br />
&nbsp; &nbsp; def OnExit(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.Destroy()&nbsp; # Close the frame.<br />
<br />
&nbsp; &nbsp; def OnClear(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.transferArea.Clear()<br />
<br />
&nbsp; &nbsp; def OnExport(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; filepath = 'gui.csv'<br />
&nbsp; &nbsp; &nbsp; &nbsp; csv_writer=csv.writer(open(filepath,&quot;w&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; title = ['DATE','FUND_ID','STRATEGY','INSTRUMENT','SECTOR','PNL$M','NAV','PERFPCT']<br />
&nbsp; &nbsp; &nbsp; &nbsp; csv_writer.writerow(title)<br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in self.result:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = [str(entry)for entry in line]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; csv_writer.writerow(line)\<br />
<br />
<br />
&nbsp; &nbsp; def OnPlot(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; r = []<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; d={}<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in self.result:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line=tuple(line)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r.append(line)<br />
&nbsp; &nbsp; &nbsp; &nbsp; r.sort()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in r:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; key=line[0]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d[key]=line[8]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; plot_list = [(i,d[i]) for i in d.keys()]<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; plot_list.sort()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; x=[]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in plot_list:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dates = datetime.datetime.strptime(line[0], '%Y-%m-%d %H:%M:%S')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x.append(dates) # append the dates to the x axis<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; date = np.asarray(x)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; count=0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; y=[]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in plot_list:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count+=float(line[1])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y.append(count) # append the results to y axis<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in x:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print line<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; for line in y:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print line<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; perf = np.asarray(y)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; fig = plt.figure()<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ax = fig.add_subplot(111)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #add some labels<br />
&nbsp; &nbsp; &nbsp; &nbsp; ax.set_ylabel('PERF IN %')<br />
&nbsp; &nbsp; &nbsp; &nbsp; ax.set_xlabel('Date')<br />
&nbsp; &nbsp; &nbsp; &nbsp; ax.set_title('Percentage Performance')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ax.plot(x,y,'s-')&nbsp; &nbsp; # plot x y <br />
&nbsp; &nbsp; &nbsp; &nbsp; fig.autofmt_xdate()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; #plt.show()<br />
&nbsp; &nbsp; &nbsp; &nbsp; plt.savefig(&quot;test.png&quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; perf_plot = 'test.png'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
<br />
app = wx.App()<br />
frame = wx.Frame(None,-1,&quot;TITLE&quot;)<br />
MainWindow(frame,-1)<br />
frame.Show(1)<br />
app.MainLoop()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>hdk</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239191.html</guid>
		</item>
		<item>
			<title>Downgraded version, need code fixes</title>
			<link>http://www.daniweb.com/forums/thread239162.html</link>
			<pubDate>Tue, 17 Nov 2009 08:54:08 GMT</pubDate>
			<description><![CDATA[Hi Everyone. 
 
I want to use this thread for some help as i'm sure this will not be the only question as i have just over 300 lines of code from my old python 3.1 script. I'm now using 2.6.4 and it is obvious some code isn't backwards compatible. 
 
Soooo .. i kept getting this error from a line...]]></description>
			<content:encoded><![CDATA[<div>Hi Everyone.<br />
<br />
I want to use this thread for some help as i'm sure this will not be the only question as i have just over 300 lines of code from my old python 3.1 script. I'm now using 2.6.4 and it is obvious some code isn't backwards compatible.<br />
<br />
Soooo .. i kept getting this error from a line of code saying<br />
<br />
&quot;import tkinter.ttk as ttk&quot;<br />
<br />
which i understand from some searching is a unique time saving shortcut built into 3.1 but i can't find what the command for 2.6.4 is?<br />
<br />
Help appreciated<br />
Thankyou</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Aiban</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239162.html</guid>
		</item>
		<item>
			<title>While loop</title>
			<link>http://www.daniweb.com/forums/thread239135.html</link>
			<pubDate>Tue, 17 Nov 2009 06:54:47 GMT</pubDate>
			<description><![CDATA[Trying to write a function but don't known how to start. 
 
trying to make a function that ask the user for the current population and displays the population after 1/2 years unitil it reaches 1 million at a rate of 8% per year. for example  
 
Year 1, population  864000 
Year 2, population  933120...]]></description>
			<content:encoded><![CDATA[<div>Trying to write a function but don't known how to start.<br />
<br />
trying to make a function that ask the user for the current population and displays the population after 1/2 years unitil it reaches 1 million at a rate of 8% per year. for example <br />
<br />
Year 1, population  864000<br />
Year 2, population  933120<br />
Year 3, population  1007769<br />
<br />
I been told to use a while loop. but the problem is I don't known how to set the question out in python codes. Please help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Musafir</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239135.html</guid>
		</item>
		<item>
			<title>for transveral in List and pop</title>
			<link>http://www.daniweb.com/forums/thread239103.html</link>
			<pubDate>Tue, 17 Nov 2009 04:05:02 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>Python Syntax</strong>...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">L = [ 0 , 2, 1 , -1 , -1 , -1, -1 ]<br />
<br />
for i in L:<br />
&nbsp; &nbsp; if i &lt;= 0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; L.pop ( i )<br />
<br />
print L</pre>What I was expecting was that L = [ 0, 2, 1 ]<br />
but the result was [ 2 , 1 , -1, -1 ]<br />
<br />
I would like to know why it is such.<br />
<br />
( I would also like to directly post python code over here, but I don't know how? )</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>The Champ</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239103.html</guid>
		</item>
		<item>
			<title>How to Stop a Thread</title>
			<link>http://www.daniweb.com/forums/thread239087.html</link>
			<pubDate>Tue, 17 Nov 2009 02:32:50 GMT</pubDate>
			<description><![CDATA[How do i stop the following thread? 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div>...]]></description>
			<content:encoded><![CDATA[<div>How do i stop the following thread?<br />
 <pre style="margin:20px; line-height:13px">from threading import Thread<br />
from scapy.all import sniff<br />
<br />
class SnifferThread(Thread):<br />
&nbsp; &nbsp; def __init__ (self,filter):<br />
&nbsp; &nbsp; &nbsp; &nbsp; Thread.__init__(self)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.filter = filter<br />
<br />
&nbsp; &nbsp; def run(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; sniff(filter=self.filter, prn=self.pkt_callback, store=0)<br />
<br />
&nbsp; &nbsp; def pkt_callback(self,pkt):<br />
&nbsp; &nbsp; &nbsp; &nbsp; print pkt.sprintf('%TCP.payload%')<br />
<br />
if __name__ == '__main__':<br />
&nbsp; &nbsp; sniffer = SnifferThread(&quot;tcp port 80&quot;)<br />
&nbsp; &nbsp; sniffer.start()<br />
&nbsp; &nbsp; #here i will make a GUI using PyQt4</pre>Should i kill it somehow? If i do kill it will the memory be cleaned?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>kapcom01</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239087.html</guid>
		</item>
		<item>
			<title>Center Text</title>
			<link>http://www.daniweb.com/forums/thread239072.html</link>
			<pubDate>Tue, 17 Nov 2009 00:31:21 GMT</pubDate>
			<description><![CDATA[How do I center my text in python?  I have a title and a description, and wan't to center it all in my output.]]></description>
			<content:encoded><![CDATA[<div>How do I center my text in python?  I have a title and a description, and wan't to center it all in my output.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>persianprez</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239072.html</guid>
		</item>
		<item>
			<title>Code signing python scripts.</title>
			<link>http://www.daniweb.com/forums/thread239046.html</link>
			<pubDate>Mon, 16 Nov 2009 21:39:50 GMT</pubDate>
			<description>There is a security technique known as code signing. It basically generates a certificate for your code. This certificate first certifies the author of the code. Second, it has a value generated from the code. This value is unique to that code. If any changes are made to the code, then the...</description>
			<content:encoded><![CDATA[<div>There is a security technique known as code signing. It basically generates a certificate for your code. This certificate first certifies the author of the code. Second, it has a value generated from the code. This value is unique to that code. If any changes are made to the code, then the certificate is invalidated.<br />
<br />
I'm just not sure how to go about doing it. I'd like to do my own. There have a paid certificate authority services, but I don't have the money to pay. There are free certificate authority services, but I'm not sure exactly which service I'd need, so I need to learn more about it.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>lrh9</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239046.html</guid>
		</item>
		<item>
			<title>How do I remove all dots from a txt file?</title>
			<link>http://www.daniweb.com/forums/thread239037.html</link>
			<pubDate>Mon, 16 Nov 2009 21:16:12 GMT</pubDate>
			<description><![CDATA[I wanted to try something seemingly easy, but I can't wrap my head around this. 
 
I want to open a .txt file, remove all dots from the text, and write the altered .txt as a new file. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I wanted to try something seemingly easy, but I can't wrap my head around this.<br />
<br />
I want to open a .txt file, remove all dots from the text, and write the altered .txt as a new file.<br />
<br />
 <pre style="margin:20px; line-height:13px">#!python<br />
<br />
def process_file():<br />
&nbsp; &nbsp; infile = open(&quot;dots.txt&quot;, &quot;r&quot;)<br />
&nbsp; &nbsp; outfile = open(&quot;no_dots.txt&quot;, &quot;w&quot;)<br />
<br />
&nbsp; &nbsp; for x in infile: # I'm pretty lost here.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;.&quot; = &quot; &quot; # --------^<br />
&nbsp; &nbsp; &nbsp; &nbsp; outfile.write() # ----^<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; infile.close()<br />
&nbsp; &nbsp; outfile.close()<br />
<br />
def main():<br />
&nbsp; &nbsp; process_file()<br />
&nbsp; &nbsp; print (&quot;Done.&quot;)<br />
<br />
main()</pre><br />
Any ideas? :-/</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Yeen</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239037.html</guid>
		</item>
		<item>
			<title>squaring loop values</title>
			<link>http://www.daniweb.com/forums/thread239013.html</link>
			<pubDate>Mon, 16 Nov 2009 19:42:21 GMT</pubDate>
			<description><![CDATA[I am writing a function that has two parameters F & L and the function returns the sum of the squares of all the intergers between F & L 
 
e.g if i call def sum(3,5) should output 50 (9 + 16 + 25) 
 
def sum(first,last): 
sqaure = i 
for i in range(first,last + 1) 
 
this is my program code at the...]]></description>
			<content:encoded><![CDATA[<div>I am writing a function that has two parameters F &amp; L and the function returns the sum of the squares of all the intergers between F &amp; L<br />
<br />
e.g if i call def sum(3,5) should output 50 (9 + 16 + 25)<br />
<br />
def sum(first,last):<br />
sqaure = i<br />
for i in range(first,last + 1)<br />
<br />
this is my program code at the moment what am I missing?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Musafir</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239013.html</guid>
		</item>
		<item>
			<title>Squared spiral</title>
			<link>http://www.daniweb.com/forums/thread239012.html</link>
			<pubDate>Mon, 16 Nov 2009 19:35:45 GMT</pubDate>
			<description>The function has two parameters, one giving the side-length and the other giving the length of the shortest line. The function should draw as many lines of the spiral that fit inside the window 
 
def spiral(lenght,side): 
    for i in range(1,side+1,5): 
     lenght.forward(i) 
    ...</description>
			<content:encoded><![CDATA[<div>The function has two parameters, one giving the side-length and the other giving the length of the shortest line. The function should draw as many lines of the spiral that fit inside the window<br />
<br />
def spiral(lenght,side):<br />
    for i in range(1,side+1,5):<br />
     lenght.forward(i)<br />
     lenght.right(90)<br />
<br />
I made a start of the code, please check the code and let me known if I am going on the right track. Also please find a solution to the problem</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Musafir</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread239012.html</guid>
		</item>
		<item>
			<title>Need to turn old project into class...</title>
			<link>http://www.daniweb.com/forums/thread238987.html</link>
			<pubDate>Mon, 16 Nov 2009 17:53:34 GMT</pubDate>
			<description>I recently wrote a thread about help with classes. I got a lot of good responses but I am still struggling with more complicated stuff. I have an old project that I wrote a few weeks into learning python. I am now suppose to turn this project into a class. This project is very linear and is written...</description>
			<content:encoded><![CDATA[<div>I recently wrote a thread about help with classes. I got a lot of good responses but I am still struggling with more complicated stuff. I have an old project that I wrote a few weeks into learning python. I am now suppose to turn this project into a class. This project is very linear and is written under one function &quot;main&quot;. I did not know much about structuring programs when I wrote it.<br />
<br />
My main problem is the structuring of the class and project. It seems I have to put def main(): under the constructor so it can be assigned to an object. How do I go about making modules for it? Is there any way to leave main() as it is and then add funtions to work as modules to call data from main()? I will add the project below to show you what I have done to turn it into a class and maybe someone could tell me what options I have regarding modules and such.<br />
<br />
 <pre style="margin:20px; line-height:13px"><br />
class R:<br />
<br />
&nbsp; &nbsp; def __init__(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; def main():<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create graphics window that user will use<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win = GraphWin(&quot;Enviornmental Model Project&quot;, 640, 480)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Set the coordinates of the graphics window to 10 by 10<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.setCoords(0,0,10,10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Set background colors using Red Green Blue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.setBackground(color_rgb(112, 140, 76))<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create a button in the lower middle of the screen<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button = Rectangle(Point(4,1), Point(6,3))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button.setWidth(2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button.setFill(color_rgb( 151, 84, 79))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; button.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create text for the button. Text may need to change later<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext = Text(Point(5,2), &quot;Enter&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Get a username from the user<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message = Text(Point(5,7.5),&quot;Hello!&nbsp; What is your name?&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setStyle('bold italic')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name = Entry(Point(5,6.5),10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; username = name.getText()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Clear username stuff<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Tell user program purpose. <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message = Text(Point(5,9),&quot;Hello %s, this program is useful in showing you \<br />
&nbsp; &nbsp; how much energy your community\n uses and how that cost can differ depending \<br />
&nbsp; &nbsp; on what energy sources you use.&quot; % (username))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Tell the user what they need to do.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2 = Text(Point(5,7.5),&quot;To see the energy usage of your community, \<br />
&nbsp; &nbsp; enter the population of your town, city, or region:&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2.setStyle('bold italic')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create an input in the graphics for the user.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enter = Entry(Point(5,6.5),7)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enter.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Write a message under the input telling user to input before clicking<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #anywhere<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message3 = Text(Point(5, 6), &quot;Enter number with no commas&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message3.setStyle('italic')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message3.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message3.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Take the users population<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userinput = enter.getText()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userinput = eval(userinput)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Wipe window of all but button<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message2.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message3.undraw()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Do all calculations dealing with energy<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Start by taking user input and dividing by the average amount of people<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #in a household<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; households = userinput / 2.59<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 2.59 is from:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #http://www.census.gov/population/socdemo/hh-fam/cps2003/tabAVG1.pdf<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; households = float(households)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Take the number of households and multiply by average number of<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #14,000 kilowatt-hours (average)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; energyinyear = households * 14000<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 14,000 is from:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #http://resources.yesican-science.ca/energy_flow/compare2_activity.html<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #To get percent, divide energyinyear by the average (taken by using the<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #same numbers up above for the entire USA pop).<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; percent = energyinyear / 1044838435300<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #All the following numbers are taken from:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #http://peswiki.com/index.php/Directory:Cents_Per_Kilowatt-Hour<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Find the price of coal in cents(range)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coalprice1 = energyinyear * 3.9<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coalprice2 = energyinyear * 4.4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #And convert to dollars<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coalprice1 = coalprice1 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coalprice2 = coalprice2 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Find the price of nuclear in cents(range)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nuclearprice1 = energyinyear * 11.1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nuclearprice2 = energyinyear * 14.5<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #And convert to dollars<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nuclearprice1 = nuclearprice2 / 100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nuclearprice2 = nuclearprice2 / 100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Find the price of gas in cents(range)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gasprice1 = energyinyear * 3.9<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gasprice2 = energyinyear * 4.4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #And convert to dollars<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gasprice1 = gasprice1 / 100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gasprice2 = gasprice2 / 100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Find the price of wind in cents(range)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windprice1 = energyinyear * 4.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windprice2 = energyinyear * 6.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #And convert to dollars<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windprice1 = windprice1 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; windprice2 = windprice2 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Find the price of hydro in cents(range)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hydroprice1 = energyinyear * 5.1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hydroprice2 = energyinyear * 11.3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #And convert to dollars<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hydroprice1 = hydroprice1 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hydroprice2 = hydroprice2 /100<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create new message<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message = Text(Point(5,9),&quot;The average American household has 2.59 people.\<br />
&nbsp; &nbsp; Given your population, there are about\n %0.0f households in your area. At \<br />
&nbsp; &nbsp; 14,000 kilowatt-hours per household per year, your area uses\n about %0.0d \<br />
&nbsp; &nbsp; kilowatt-hours of energy in a year.\n\n This is %0.9f percent of the national \<br />
&nbsp; &nbsp; average, 1,044,838,435,300 killowatt-hours!&quot; \<br />
&nbsp; &nbsp; % (households, energyinyear, percent))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Delete user input box and button text<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enter.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Add another message, giving information.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1 = Text(Point(5,7), &quot;\n____________________________________________\<br />
&nbsp; &nbsp; _____________________________________________________\n \nOne type of energy \<br />
&nbsp; &nbsp; is coal. 50% percent of the energy produced by the United States is coal.\n \<br />
&nbsp; &nbsp; Coal is bad for the environment because it releases Co2 into the atmosphere \<br />
&nbsp; &nbsp; after being\n turned into energy. One ton of coal can produce 2,500 killo-watt \<br />
&nbsp; &nbsp; hours of energy.\n\nCoal is plentiful but terrible for the enviroment as it \<br />
&nbsp; &nbsp; produces CO2 into the atmosphere. &quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.draw(win)<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Add another message, giving price of coal.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5 = Text(Point(5,5), &quot;It would cost between $%0.2f and $%0.2f to \<br />
&nbsp; &nbsp; pay for the bill just using coal alone.&quot; % (coalprice1,coalprice2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5.setFace('times roman')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Tell user to click to continue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext = Text(Point(5,2), &quot;Continue&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Clear page again<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message5.undraw()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Write another message dealing with prices and gas / nuclear energy<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1 = Text(Point(5,9), &quot;The other two types of energy commonly used \<br />
&nbsp; &nbsp; are gas and nuclear. Nuclear is more\n expensive but cleaner while gas is less \<br />
&nbsp; &nbsp; expensive but is let out as a greenhouse gas.\n\n Using just nuclear energy \<br />
&nbsp; &nbsp; the bill would be between $%0.2f and $%0.2f while the bill\n would be between \<br />
&nbsp; &nbsp; $%0.2f and $%0.2f using just natural gas.&quot; \<br />
&nbsp; &nbsp; % (nuclearprice1, nuclearprice2, gasprice1, gasprice2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Write one more message, dealing with alternative energies<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4 = Text(Point(5,6), &quot;Believe it or not renewable energy sources \<br />
&nbsp; &nbsp; are, for the most part, just as cheap as the fuels\n we use today as shown \<br />
&nbsp; &nbsp; below:\n\nWind: Between %0.2f and %0.2f.\nHydro: Between %0.2f and %0.2f.\n\n\<br />
&nbsp; &nbsp; The only problem using these technologies is the fact that they are difficult. \<br />
&nbsp; &nbsp; For example,\n wind turbines are big, bulky, loud and unstable in bad weather. \<br />
&nbsp; &nbsp; Hyrdo plants can\n only be built in certain places and can damage the \<br />
&nbsp; &nbsp; aquatic eco-system.&quot; % (windprice1, windprice2, hydroprice1, hydroprice2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.draw(win)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Clear and continue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message1.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.undraw()<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Create Exit &quot;button&quot; (text)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext = Text(Point(5,2), &quot;Exit&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buttontext.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #Give an exit message<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4 = Text(Point(5,8), &quot;This program shows why you should go out and \<br />
&nbsp; &nbsp; support renewable energy. Although it has flaws,\n renewable energy is the way \<br />
&nbsp; &nbsp; of the future and will not cost you much (or any) more money.\n Solar power is \<br />
&nbsp; &nbsp; still in development and currently costs more to produce, so much that it \<br />
&nbsp; &nbsp; isn't\n cost effiecent at the moment. However, you can still use panels for \<br />
&nbsp; &nbsp; indvidual homes and\n save money.\n\n More information about solar energy can \<br />
&nbsp; &nbsp; be found at http://www.solarenergy.org .&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.setSize(10)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.setStyle('bold')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message4.draw(win)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win.close()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if __name__ == &quot;__main__&quot;: main()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>A_Dubbs</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238987.html</guid>
		</item>
		<item>
			<title>These three things</title>
			<link>http://www.daniweb.com/forums/thread238833.html</link>
			<pubDate>Mon, 16 Nov 2009 04:59:50 GMT</pubDate>
			<description><![CDATA[These three things are holding me back. 
 
1. The new style class object parameter -   <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags"...]]></description>
			<content:encoded><![CDATA[<div>These three things are holding me back.<br />
<br />
1. The new style class object parameter -  <pre style="margin:20px; line-height:13px">class MyClass(object)</pre><blockquote>Note that I'M also also not familir with the old style</blockquote>2. The  <pre style="margin:20px; line-height:13px">_init_(</pre> - constructor, or any constructs for that matter.<br />
<br />
3. The  <pre style="margin:20px; line-height:13px">(self)</pre> parameter. How is it different from the normal parameters or arguments?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238833.html</guid>
		</item>
		<item>
			<title>Help please ? Currency Converter</title>
			<link>http://www.daniweb.com/forums/thread238828.html</link>
			<pubDate>Mon, 16 Nov 2009 04:37:49 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div> <strong>Python Syntax</strong>...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">import Tkinter<br />
<br />
class converter(Tkinter.Tk):<br />
&nbsp;  <br />
&nbsp; &nbsp; def __init__(self,parent):<br />
&nbsp; &nbsp; &nbsp; &nbsp; Tkinter.Tk.__init__(self,parent)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.parent = parent<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.initialize()<br />
<br />
&nbsp; &nbsp; def initialize(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.grid()<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable = Tkinter.IntVar()<br />
&nbsp; &nbsp; &nbsp; &nbsp; welcome = Tkinter.Label(self, textvariable=self.labelVariable, anchor=&quot;w&quot;, fg=&quot;black&quot;, bg=&quot;lightgrey&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; welcome.grid(column=0, row=0, columnspan=3, sticky='EW')<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable.set(u&quot;Hello there. Welcome to MAKK's currency converter.&quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entryVariable = Tkinter.StringVar()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry = Tkinter.Entry(self,textvariable=self.entryVariable)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.grid(column=0, row=1, sticky='EW')<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.bind(&quot;&lt;Return&gt;&quot;, self.OnPressEnter)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entryVariable.set(u&quot;Enter currency here.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; money = self.entryVariable.set<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; toUSD = Tkinter.Button(self, text=u&quot;Convert to USD&quot;, command=self.ConvertToUSD)<br />
&nbsp; &nbsp; &nbsp; &nbsp; toUSD.grid(column=1, row=1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; toCAD = Tkinter.Button(self, text=u&quot;Convert to CAD&quot;, command=self.ConvertToCAD)<br />
&nbsp; &nbsp; &nbsp; &nbsp; toCAD.grid(column=2, row=1)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable = Tkinter.StringVar()<br />
&nbsp; &nbsp; &nbsp; &nbsp; output = Tkinter.Label(self, textvariable=self.labelVariable, anchor=&quot;w&quot;, fg=&quot;black&quot;, bg=&quot;lightgrey&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; output.grid(column=0, row=3, columnspan=3, sticky='EW')<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable.set(u&quot;Hello !&quot;)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.grid_columnconfigure(0,weight=1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.resizable(False,False)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.update()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.geometry(self.geometry())<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.focus_set()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.selection_range(0, Tkinter.END)<br />
<br />
&nbsp; &nbsp; def ConvertToUSD(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable.set(self.entryVariable.get()+ &quot;You clicked the button !&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.focus_set()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.selection_range(0, Tkinter.END)<br />
<br />
&nbsp; &nbsp; def ConvertToCAD(self):<br />
&nbsp; &nbsp; &nbsp; &nbsp; money = entry(self)<br />
&nbsp; &nbsp; &nbsp; &nbsp; money = money * 1.05<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable.set(&quot;The converted currency in CAD is &quot; + money)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.focus_set()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.selection_range(0, Tkinter.END)<br />
<br />
&nbsp; &nbsp; def OnPressEnter(self,event):<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.labelVariable.set(self.entryVariable.get()+ &quot;You pressed enter !&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.focus_set()<br />
&nbsp; &nbsp; &nbsp; &nbsp; self.entry.selection_range(0, Tkinter.END)<br />
<br />
if __name__ == &quot;__main__&quot;:<br />
&nbsp; &nbsp; app = converter(None)<br />
&nbsp; &nbsp; app.title('Currency Converter')<br />
&nbsp; &nbsp; app.mainloop()</pre><br />
I get the error &quot;NameError: global name 'entry' is not defined&quot;.. I'm trying to use the text inputted in the textbox as an integer variable usable to convert currency between CAD and USD.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>kjpadilla</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238828.html</guid>
		</item>
		<item>
			<title>Anybody know how to speed up beautifulsoup?</title>
			<link>http://www.daniweb.com/forums/thread238801.html</link>
			<pubDate>Mon, 16 Nov 2009 02:51:49 GMT</pubDate>
			<description><![CDATA[I don't understand the documentation]]></description>
			<content:encoded><![CDATA[<div>I don't understand the documentation</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gunbuster363</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238801.html</guid>
		</item>
		<item>
			<title>HTTP tunnel</title>
			<link>http://www.daniweb.com/forums/thread238789.html</link>
			<pubDate>Mon, 16 Nov 2009 01:30:02 GMT</pubDate>
			<description>Hi, 
 
I am new to python programming. I am interested in writing a HTTP proxy using poll or twisted. I know how the tunnel works but I am not sure of starting the code. I need help from experts to complete the programming.  
 
As far as I know a tunnel acts as both client and server. When a client...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I am new to python programming. I am interested in writing a HTTP proxy using poll or twisted. I know how the tunnel works but I am not sure of starting the code. I need help from experts to complete the programming. <br />
<br />
As far as I know a tunnel acts as both client and server. When a client requests for a page the tunnel acts as a server accepting the request from the client and then it forwards the connection to the web server then passes the request back to the client.<br />
<br />
I am not sure of how many sockets to create. Do I need to write the program in a single file or should I have two file for client and a server. I am thinking of creating 2 sockets then connect to the client with the socket and then connect to the server with other socket and forward the request to the server. I don't know whether I am right or wrong. I need help to continue with the process.<br />
<br />
Thanks. Help from the experts is appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>whimsical1987</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238789.html</guid>
		</item>
		<item>
			<title>pygame doesnt let me add pictures in any format! why?</title>
			<link>http://www.daniweb.com/forums/thread238781.html</link>
			<pubDate>Sun, 15 Nov 2009 23:50:44 GMT</pubDate>
			<description>hello, me again. When ever I try to add pictures it WONT LET ME ADD THEM. i download them, type all the code, and no image shows up at all. Can someone tell me how to correctly do it. do i have to define the code that imports pictures?</description>
			<content:encoded><![CDATA[<div>hello, me again. When ever I try to add pictures it WONT LET ME ADD THEM. i download them, type all the code, and no image shows up at all. Can someone tell me how to correctly do it. do i have to define the code that imports pictures?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python user</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238781.html</guid>
		</item>
		<item>
			<title>Need help placing towers</title>
			<link>http://www.daniweb.com/forums/thread238778.html</link>
			<pubDate>Sun, 15 Nov 2009 23:23:09 GMT</pubDate>
			<description><![CDATA[I'm trying to make a tower defense game, i got all my tiles setup, but i need help with selecting a tower and placing it anywhere in the tile. 
 
This is an example of my tower class: 
 
class Missile(pygame.sprite.Sprite): 
    def __init__(self): 
        pygame.sprite.Sprite.__init__(self) 
    ...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to make a tower defense game, i got all my tiles setup, but i need help with selecting a tower and placing it anywhere in the tile.<br />
<br />
This is an example of my tower class:<br />
<br />
class Missile(pygame.sprite.Sprite):<br />
    def __init__(self):<br />
        pygame.sprite.Sprite.__init__(self)<br />
        self.cost = 100<br />
        self.selected = False<br />
        self.image = pygame.image.load(os.path.join('images', 'missile.png'))<br />
        self.rect = self.image.get_rect()<br />
        self.center = (520, 86)<br />
<br />
    def update(self):<br />
        self.rect.center = self.center</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>bisfrim</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238778.html</guid>
		</item>
		<item>
			<title>While loop help</title>
			<link>http://www.daniweb.com/forums/thread238777.html</link>
			<pubDate>Sun, 15 Nov 2009 23:21:39 GMT</pubDate>
			<description><![CDATA[Hi everybody, 
 
I'm trying to write a function that takes in 2 values, a min and a max, that prompts the user to enter a value within that range, and uses 0 as a sentinel to quit the loop.  
 
My issue is, I also want the loop to continue prompting the user when the user enters nothing (i.e. hits...]]></description>
			<content:encoded><![CDATA[<div>Hi everybody,<br />
<br />
I'm trying to write a function that takes in 2 values, a min and a max, that prompts the user to enter a value within that range, and uses 0 as a sentinel to quit the loop. <br />
<br />
My issue is, I also want the loop to continue prompting the user when the user enters nothing (i.e. hits enter) until a value between the range is entered. How do I go about doing this with the code I have already written? Thanks!<br />
<br />
 <pre style="margin:20px; line-height:13px">def getValidNum(min, max):<br />
&nbsp; &nbsp; QUESTION = &quot;Enter a value, 0 to quit: &quot;<br />
<br />
&nbsp; &nbsp; num = input(QUESTION)<br />
<br />
&nbsp; &nbsp; while num != 0:<br />
&nbsp; &nbsp; &nbsp; &nbsp; if num in range(min, max + 1):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return num&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Sorry %d - %d or 0 only&quot;) % min, max<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Try again.&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num = input(QUESTION)</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>MRWIGGLES</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238777.html</guid>
		</item>
		<item>
			<title>Code for an if game i made(tips, examples, improvements)</title>
			<link>http://www.daniweb.com/forums/thread238771.html</link>
			<pubDate>Sun, 15 Nov 2009 22:40:00 GMT</pubDate>
			<description><![CDATA[hello, i'm new to this website and well only have a few months of python exp. i decided to make a small, simple rather easy if HUMOR game. When is started, i did not know a whole lot other than how to make lists and scenes and make a way to get "a key"  to "open doors" and hiding them under "lamps,...]]></description>
			<content:encoded><![CDATA[<div>hello, i'm new to this website and well only have a few months of python exp. i decided to make a small, simple rather easy if HUMOR game. When is started, i did not know a whole lot other than how to make lists and scenes and make a way to get &quot;a key&quot;  to &quot;open doors&quot; and hiding them under &quot;lamps, beds, etc.&quot; I know a bit more from studying other peoples code. so here it is(Note it says version 2.0 because i this one has some slight &quot;modifications&quot; made to it, if you want, i could post version 1.0) :<br />
<br />
# Title: All out of Cheese burgers, Version 2.0<br />
# Genre: Humor/Text Adventure<br />
# Date: November 16, 2009<br />
<br />
import textwrap<br />
import sys<br />
<br />
# Intro text:<br />
scenes = {<br />
    &quot;The Harry Hamburger&quot;: {<br />
                     &quot;description&quot;: &quot;You are standing in a long line at the register. To the NORTH of you is the order window, &quot; \<br />
                                    &quot;to the EAST of you is the kitchen, to the WEST of you is the MASCOT, and to the &quot; \<br />
                                    &quot;the SOUTH of you is the walk-in freezer.&quot;,<br />
                                    <br />
                     &quot;paths&quot;: [<br />
                         { &quot;go_to&quot;: &quot;order window&quot;, &quot;phrase&quot;: &quot;Go north to the order window&quot; },<br />
                         { &quot;go_to&quot;: &quot;kitchen&quot;,      &quot;phrase&quot;: &quot;Go east to the kitchen&quot; },<br />
                         { &quot;go_to&quot;: &quot;MASCOT&quot;,       &quot;phrase&quot;: &quot;Go south to the MASCOT&quot; },<br />
                         { &quot;go_to&quot;: &quot;walkin freezer&quot;, &quot;phrase&quot;: &quot;Go west to the walk-in freezer&quot; }<br />
<br />
                    ]<br />
    },<br />
    &quot;walkin freezer&quot;: {<br />
        &quot;description&quot;: &quot;You are standing at the door of the walk in freezer, which is locked. &quot; \<br />
        &quot;You'll need to find a way to open it. Perhaps a key is somewhere in the restraunt.&quot;,<br />
<br />
                    &quot;paths&quot;: [<br />
                        { &quot;go_to&quot;: &quot;kitchen&quot;, &quot;phrase&quot;: &quot;Go east to the kitchen&quot; },<br />
                        { &quot;go_to&quot;: &quot;MASCOT&quot;, &quot;phrase&quot;: &quot;Go north to the mascot&quot; }<br />
                       <br />
                         <br />
                    ]<br />
                },<br />
                &quot;order window&quot;: {<br />
                    &quot;description&quot;:  &quot;You finally reach the order window at last. The fast food clerk &quot; \<br />
                                    &quot;tells you that they are all out of cheese burgers. None of the other &quot; \<br />
                                    &quot;items on the menu interest you. You leave the building in disappointment.&quot;,<br />
                    &quot;paths&quot;: [ ]<br />
                },<br />
                &quot;kitchen&quot;: {<br />
                    &quot;description&quot;: &quot;Sneaking in to the kitchen, you can't believe your eyes. Melted cheese on top of &quot; \<br />
                                   &quot;of sesame seed buns fill your nostrils and you almost could began to drool. You want to &quot; \<br />
                                   &quot;avoid detection as your goal is the walk-in freezer so you refrain from stealing anything.&quot;,<br />
                    &quot;paths&quot;: [<br />
                        { &quot;go_to&quot;: &quot;MASCOT&quot;,      &quot;phrase&quot;: &quot;Go west to the MASCOT&quot; }<br />
                    ]<br />
                <br />
                },<br />
                &quot;MASCOT&quot;: {<br />
                    &quot;description&quot;: &quot;The Harry Hamburger mascot stands off to the side of the order window and is handing &quot; \<br />
                                   &quot;out free coupons to passer bys and on his side is a key. You quickly grab his key before anyone notices &quot; \<br />
                                   &quot;and you than go to the locked door and open the walk-in freezer. CONGRATS, YOU WIN!&quot;,<br />
                    &quot;paths&quot;: [ ]<br />
                }<br />
}<br />
<br />
<br />
<br />
            <br />
             <br />
scene = scenes[&quot;The Harry Hamburger&quot;]<br />
<br />
while 1 == 1:<br />
    next_step = None<br />
    description = scene[&quot;description&quot;]<br />
    paths = scene[&quot;paths&quot;]<br />
<br />
    print textwrap.fill(description)<br />
<br />
    for i in range(0, len(paths)):<br />
        path = paths[i]<br />
        menu_item = i + 1<br />
        print &quot;\t&quot;, menu_item, path[&quot;phrase&quot;]<br />
<br />
    print &quot;\t(0 Quit)&quot;<br />
<br />
    prompt = &quot;Make a selection (0 - %i): &quot; % len(paths)<br />
<br />
    while next_step == None:<br />
        try:<br />
            choice = raw_input(prompt)<br />
            menu_selection = int(choice)<br />
<br />
            if menu_selection == 0:<br />
                next_step = &quot;quit&quot;<br />
            else:<br />
                index = menu_selection - 1<br />
                next_step = paths[ index ]<br />
        except (IndexError, ValueError):<br />
            print choice, &quot;Unknown Command!&quot;<br />
<br />
    if next_step == &quot;quit&quot;:<br />
        print &quot;I hope you had fun, Bye!&quot;<br />
        sys.exit()<br />
    else:<br />
        scene = scenes[next_step['go_to'] ]<br />
        print &quot;You decided to:&quot;, next_step[&quot;phrase&quot;]</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>python user</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238771.html</guid>
		</item>
		<item>
			<title><![CDATA[Why is it that if input 1, line 1 isn't deleted?]]></title>
			<link>http://www.daniweb.com/forums/thread238766.html</link>
			<pubDate>Sun, 15 Nov 2009 22:10:26 GMT</pubDate>
			<description><![CDATA[Why is it that if input 1, line 1 isn't deleted in a.txt? 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help...]]></description>
			<content:encoded><![CDATA[<div>Why is it that if input 1, line 1 isn't deleted in a.txt?<br />
<br />
 <pre style="margin:20px; line-height:13px">x = open('a.txt','r')<br />
l = []<br />
q = 0<br />
for line in x:<br />
&nbsp; &nbsp; &nbsp; &nbsp; l.append(str(line))<br />
b = &quot;&quot;.join(l)<br />
print b<br />
a = raw_input(&quot;Which line do you want to delete?: &quot;)<br />
l[int(a)] = &quot;&quot;<br />
x.close()<br />
x = open('a.txt','w')<br />
x.write(b)<br />
x.close()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>nevets04</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238766.html</guid>
		</item>
		<item>
			<title>Code Snippet Getting an input without hitting enter</title>
			<link>http://www.daniweb.com/code/snippet238746.html</link>
			<pubDate>Sun, 15 Nov 2009 19:59:20 GMT</pubDate>
			<description><![CDATA[*!USING PYTHON 3.1!* 
*USING WINDOWS* 
 
I never thought it could be so simple. 
However I should have clarified that it's a *1 character* input. But the general idea is the same. Someone suggested that I explain what is going on better, so I'm going to do that. The function 'getch()' waits for a...]]></description>
			<content:encoded><![CDATA[<div><span style="font-weight:bold">!USING PYTHON 3.1!</span><br />
<span style="font-weight:bold">USING WINDOWS</span><br />
<br />
I never thought it could be so simple.<br />
However I should have clarified that it's a <span style="font-weight:bold">1 character</span> input. But the general idea is the same. Someone suggested that I explain what is going on better, so I'm going to do that. The function 'getch()' waits for a keyboard hit. But the reason that it has to be converted so many times in the line '(str(list(str(getch()))[2]))' is because getch() has to be annoying and add a  b(It's a nonetype) before everything, and to be even more annoying, it's not a string (grrr)... So we have to first convert the whole thing to a string, put it in a list, take the 3rd item from the list, which would be the character you pressed. Convert it back to a string, then print it.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>AutoPython</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238746.html</guid>
		</item>
		<item>
			<title><![CDATA[Newbie chrashed & burned before takeoff]]></title>
			<link>http://www.daniweb.com/forums/thread238693.html</link>
			<pubDate>Sun, 15 Nov 2009 18:13:13 GMT</pubDate>
			<description>Hi y´all. 
 
I´m more than a little green at this and have been trying to get an understandig of Python. 
 
I came across WXPython and decided to try the first program in the tutorial by Fuze 
I´ve downloaded and installed python 2.6.3 and Wxpython 2.8.10.1. 
I´ve also got Python 3.1 installed...</description>
			<content:encoded><![CDATA[<div>Hi y´all.<br />
<br />
I´m more than a little green at this and have been trying to get an understandig of Python.<br />
<br />
I came across WXPython and decided to try the first program in the tutorial by Fuze<br />
I´ve downloaded and installed python 2.6.3 and Wxpython 2.8.10.1.<br />
I´ve also got Python 3.1 installed previously but Wx demanded Python 2.6.<br />
<br />
Here´s what i typed in:<br />
<br />
 <pre style="margin:20px; line-height:13px">import wx<br />
&quot;&quot;&quot;The start of our wxPython tutorial&quot;&quot;&quot;<br />
<br />
app = wx.App(redirect=False)<br />
<br />
window = wx.Frame(None, title = 'Sample GUI App.')<br />
btn = wx.Button(window)<br />
<br />
Window.Show()<br />
app.Mainloop()</pre><br />
As far as i can see exactly the same as the first example by Fuze.<br />
I stored the program.<br />
I tried running from a command prompt: Got runtime error bad magic number????<br />
<br />
I tried running from &quot;this computer&quot; on windows desktop: a command prompt opens and closes almost instantly.<br />
<br />
I tried copying the program into IDLE for Python 2.6 and got zero/nothing/nada result.<br />
<br />
I tried copying the program directly from the tutorial with the same result.<br />
<br />
I´m running XP-pro on a bog-standard computer.<br />
<br />
Please help!!<br />
<br />
Regards<br />
ELO</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Polar67</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238693.html</guid>
		</item>
		<item>
			<title>how to create variables when program is running?</title>
			<link>http://www.daniweb.com/forums/thread238673.html</link>
			<pubDate>Sun, 15 Nov 2009 16:35:54 GMT</pubDate>
			<description><![CDATA[Say I've written a function that will take an unlimited number of arguments and store them under different variables.  
Since the use is able to input any number of strings, it's not possible to give names to all the variables that might be created. 
So, how would I create variables when the...]]></description>
			<content:encoded><![CDATA[<div>Say I've written a function that will take an unlimited number of arguments and store them under different variables. <br />
Since the use is able to input any number of strings, it's not possible to give names to all the variables that might be created.<br />
So, how would I create variables when the program is running ? I would like to create variables that have progressive names like.. (for the example above),  string_one, string_two, string_three.. or string1, string2 , string3<br />
<br />
EDIT: Just did some googling... Could I use dictionaries?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>mahela007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238673.html</guid>
		</item>
		<item>
			<title>Windows Gadgets in Python</title>
			<link>http://www.daniweb.com/forums/thread238666.html</link>
			<pubDate>Sun, 15 Nov 2009 15:40:58 GMT</pubDate>
			<description><![CDATA[I'll keep this simple for now 
 
Can a windows (7) gadget be made with python or does some microsoft type development kit need to be used? 
 
Thanks]]></description>
			<content:encoded><![CDATA[<div>I'll keep this simple for now<br />
<br />
Can a windows (7) gadget be made with python or does some microsoft type development kit need to be used?<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Aiban</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238666.html</guid>
		</item>
		<item>
			<title>Version Issues</title>
			<link>http://www.daniweb.com/forums/thread238665.html</link>
			<pubDate>Sun, 15 Nov 2009 15:17:23 GMT</pubDate>
			<description><![CDATA[Hey Everyone. 
 
I'm back. I started a Python project that actually got close to completion back about six months ago. Most times when i requested help i was often suggested that i don't use v3 of python as many things changed (someones help code was for 2.x and didn't work) etc and i believe at...]]></description>
			<content:encoded><![CDATA[<div>Hey Everyone.<br />
<br />
I'm back. I started a Python project that actually got close to completion back about six months ago. Most times when i requested help i was often suggested that i don't use v3 of python as many things changed (someones help code was for 2.x and didn't work) etc and i believe at the time there was no .exe creator either (bummer)<br />
That was quite some months ago now and as my last uni exam is today, i intend to spend the next 3 months of my free time getting back into this programming and wonder if v3 has advanced as the version to use, can .exe be created being my main issues (an exe that can run on almost all versions of windows without installation)<br />
<br />
Any advice appreciated as it may make any future help me posts more easier to answer.<br />
<br />
Thanks guys and girls.<br />
<br />
P.S. No longer on vista either, while i have win7 64 bit now, i'm thinking of using my XP box to continue my programming.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Aiban</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238665.html</guid>
		</item>
		<item>
			<title>clicking to call a function?</title>
			<link>http://www.daniweb.com/forums/thread238664.html</link>
			<pubDate>Sun, 15 Nov 2009 15:11:22 GMT</pubDate>
			<description>How could I call function by clicking in the graphics window. I currently have a draw eyes function but i want to be able to call it by clicking on the graphics window and call 30 eyes in the same colour sequence of blue, green and brown? so i could plot the eyes on chosen centre points of the...</description>
			<content:encoded><![CDATA[<div>How could I call function by clicking in the graphics window. I currently have a draw eyes function but i want to be able to call it by clicking on the graphics window and call 30 eyes in the same colour sequence of blue, green and brown? so i could plot the eyes on chosen centre points of the graphics window?<br />
 <pre style="margin:20px; line-height:13px">from graphics import *<br />
<br />
eye_colours = set(&quot;&quot;&quot;green brown blue&quot;&quot;&quot;.strip().split())<br />
<br />
def drawCircle(win, centre, radius, colour):<br />
&nbsp; &nbsp; circle = Circle(centre, radius)<br />
&nbsp; &nbsp; circle.setFill(colour)<br />
&nbsp; &nbsp; circle.setWidth(2)<br />
&nbsp; &nbsp; circle.draw(win)<br />
<br />
def eyePicker():<br />
&nbsp; &nbsp; while True:<br />
&nbsp; &nbsp; &nbsp; colour = raw_input(&quot;Please enter the colour: &quot;).strip()<br />
&nbsp; &nbsp; &nbsp; colour = colour.lower()<br />
&nbsp; &nbsp; &nbsp; if colour in eye_colours:<br />
&nbsp; &nbsp; &nbsp; &nbsp; return colour<br />
&nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Invalid colour '{0}'.&quot;.format(colour))<br />
&nbsp; &nbsp; &nbsp; &nbsp; print(&quot;Possible values are {0}&quot;.format(tuple(eye_colours)))<br />
&nbsp; &nbsp; <br />
<br />
<br />
def drawEye():<br />
&nbsp; &nbsp; w = 250<br />
&nbsp; &nbsp; h = 250<br />
&nbsp; &nbsp; win = GraphWin(&quot;Eye&quot;, w, h)<br />
&nbsp; &nbsp; try:<br />
&nbsp; &nbsp; &nbsp; # center should be at 1/2 width and height<br />
&nbsp; &nbsp; &nbsp; centre = Point(w//2, h//2)<br />
&nbsp; &nbsp; &nbsp; colour = eyePicker()<br />
&nbsp; &nbsp; &nbsp; drawCircle(win, centre, 40, colour)<br />
&nbsp; &nbsp; &nbsp; drawCircle(win, centre, 20, colour)<br />
&nbsp; &nbsp; &nbsp; drawCircle(win, centre, 10, colour)<br />
&nbsp; &nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; finally:<br />
&nbsp; &nbsp; &nbsp; win.close()<br />
<br />
drawEye()<br />
<br />
def eyesEverywhere():<br />
&nbsp; &nbsp; w = 500<br />
&nbsp; &nbsp; h = 500</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gangster88</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238664.html</guid>
		</item>
		<item>
			<title>Writing a new textfile</title>
			<link>http://www.daniweb.com/forums/thread238629.html</link>
			<pubDate>Sun, 15 Nov 2009 10:25:48 GMT</pubDate>
			<description><![CDATA[Hi all. I am very new at python and so i am having trouble with the simplest things, and i dont understand why this: 
newfile = raw_input('what do you want to name your new file?') 
text_file = open (newfile, "w") 
isn't working. Can somebody explain it? Thankyou]]></description>
			<content:encoded><![CDATA[<div>Hi all. I am very new at python and so i am having trouble with the simplest things, and i dont understand why this:<br />
newfile = raw_input('what do you want to name your new file?')<br />
text_file = open (newfile, &quot;w&quot;)<br />
isn't working. Can somebody explain it? Thankyou</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Fetch</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238629.html</guid>
		</item>
		<item>
			<title>List (reading them, writing them, sorting them)</title>
			<link>http://www.daniweb.com/forums/thread238601.html</link>
			<pubDate>Sun, 15 Nov 2009 07:26:57 GMT</pubDate>
			<description><![CDATA[I'm having the hardest time figuring out how my latest homework assignment is supposed to work. Basically we have to write a program that creates a list containing names. The list will then be sorted, written to an output file, and searched. We get the names from a text file that is provided to us....]]></description>
			<content:encoded><![CDATA[<div>I'm having the hardest time figuring out how my latest homework assignment is supposed to work. Basically we have to write a program that creates a list containing names. The list will then be sorted, written to an output file, and searched. We get the names from a text file that is provided to us. It must contain 4 functions. Here's what I have so far. <br />
<br />
 <pre style="margin:20px; line-height:13px">def main():<br />
&nbsp; &nbsp; name_list()<br />
&nbsp; &nbsp; print_list()<br />
&nbsp; &nbsp; write_output()<br />
&nbsp; &nbsp; search_list()<br />
&nbsp; &nbsp; <br />
def name_list():<br />
&nbsp; &nbsp; infile = open('names.txt', 'r')<br />
&nbsp; &nbsp; names = infile.readlines()<br />
&nbsp; &nbsp; infile.close()<br />
&nbsp; &nbsp; index = 0<br />
&nbsp; &nbsp; while index &lt; len(names):<br />
&nbsp; &nbsp; &nbsp; &nbsp; names[index] = names[index].rstrip('\n')<br />
&nbsp; &nbsp; &nbsp; &nbsp; index += 1<br />
&nbsp; &nbsp; return names&nbsp; &nbsp; <br />
<br />
def print_list():<br />
&nbsp; &nbsp; names = [infile]<br />
&nbsp; &nbsp; print 'Original order:', names<br />
&nbsp; &nbsp; names.sort()<br />
&nbsp; &nbsp; print 'Sorted order:', names<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
def write_output():&nbsp; &nbsp; <br />
&nbsp; &nbsp; outfile = open('names.txt', 'w')<br />
&nbsp; &nbsp; outfile.write(names)<br />
&nbsp; &nbsp; outfile.close()<br />
&nbsp; &nbsp; <br />
def search_list():<br />
&nbsp; &nbsp; search = input ('Enter last name, first name:')<br />
&nbsp; &nbsp; if search in text_file:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print <br />
&nbsp; &nbsp; else: <br />
&nbsp; &nbsp; &nbsp; &nbsp; print <br />
&nbsp; &nbsp; <br />
main()</pre><br />
After reading the book I feel pretty good about my first function. Although that could be wrong, too. I need to return the list of names to the main function then pass the names_list to the remaining functions. The search_list function needs to say whether the input name is in the list and what its index is in the list. <br />
<br />
The problem is I keep getting an error for no such file or directory. Anyone have a clue as to why it wont read the list I was provided. I know the codes a mess but I copied the code from the book by itself to see if it would read it and it still wouldn't work. That's like the first step in the program so until I figure that out I can't proceed.<br />
<br />
Thanks for any help you can offer.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>tlj333</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238601.html</guid>
		</item>
		<item>
			<title>Tutorial SIMPLE threading tutorial</title>
			<link>http://www.daniweb.com/tutorials/tutorial238590.html</link>
			<pubDate>Sun, 15 Nov 2009 04:08:38 GMT</pubDate>
			<description><![CDATA[*!USING PYTHON 3.1!* 
 
Hello DaniWeb! Today I'm going to be posting a *simple* threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a simple...]]></description>
			<content:encoded><![CDATA[<div><span style="font-weight:bold">!USING PYTHON 3.1!</span><br />
<br />
Hello DaniWeb! Today I'm going to be posting a <span style="font-weight:bold">simple</span> threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a simple program. When the program starts it is going to start a timer, and it will show the time. Now, observe these 2, similar programs.<br />
<br />
Good version:<br />
 <pre style="margin:20px; line-height:13px">import threading<br />
import time<br />
<br />
threadBreak = False<br />
def TimeProcess():<br />
&nbsp; &nbsp; while not threadBreak:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (time.time() - startTime)<br />
<br />
startTime = time.time()<br />
<br />
threading.Thread(target = TimeProcess).start()<br />
<br />
input()<br />
threadBreak = True<br />
quit()</pre><br />
Bad Version:<br />
 <pre style="margin:20px; line-height:13px">import threading<br />
import time<br />
<br />
threadBreak = False<br />
def TimeProcess():<br />
&nbsp; &nbsp; while not threadBreak:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (time.time() - startTime)<br />
<br />
startTime = time.time()<br />
<br />
TimeProcess()<br />
<br />
input()<br />
threadBreak = True <br />
quit()</pre><br />
Now, you may notice that, the working version will exit after you press any key. The not working version, will not let you quit after pressing anything. That is because this command:<br />
<br />
threading.Thread(target = FunctionName)<br />
<br />
Will run that function, but the function won't take control over the main code. Okay, now I have some more explaining to do. Let's view the commented version of the code:<br />
<br />
 <pre style="margin:20px; line-height:13px">import threading<br />
import time<br />
<br />
threadBreak = False<br />
def TimeProcess():<br />
&nbsp; &nbsp; while not threadBreak: ## it will run this as long as threadBreak is false<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (time.time() - startTime) <br />
<br />
startTime = time.time() ## I'm not sure how this works, just learned the trick.<br />
<br />
threading.Thread(target = TimeProcess).start() ## Starts the thread in the background. <br />
<br />
input()<br />
threadBreak = True ## stops the thread<br />
quit()</pre><br />
That's a simple form of threading. But here's a more functional version of the above program. <br />
<br />
 <pre style="margin:20px; line-height:13px">import threading<br />
import time<br />
<br />
print (&quot;Press any key to start timer!&quot;)<br />
input()<br />
<br />
threadBreak = False<br />
def TimeProcess():<br />
&nbsp; &nbsp; while not threadBreak:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print (time.time() - startTime)<br />
<br />
startTime = time.time()<br />
<br />
threading.Thread(target = TimeProcess).start()<br />
<br />
input()<br />
threadBreak = True<br />
input ()<br />
quit()</pre><br />
Well that's a simple threading tutorial! Threading can have many more uses, and don't only limit yourself to this.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>AutoPython</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238590.html</guid>
		</item>
		<item>
			<title>how do you read this?</title>
			<link>http://www.daniweb.com/forums/thread238580.html</link>
			<pubDate>Sun, 15 Nov 2009 01:38:36 GMT</pubDate>
			<description><![CDATA[This is a sample code I looked up. I am a rookie and I do not really understand it. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code...]]></description>
			<content:encoded><![CDATA[<div>This is a sample code I looked up. I am a rookie and I do not really understand it.<br />
<br />
 <pre style="margin:20px; line-height:13px">n = int(input('Enter an interger &gt;= 0:'))<br />
fact = 1<br />
for i in range(2,n+1):<br />
&nbsp; &nbsp; &nbsp; &nbsp; fact = fact*i<br />
print(str(n)+' factorial is '+ str(fact))</pre>My biggest problems are:<br />
<br />
1) for i in range(2,n+1) how do read this? I looked up the doc and it said &quot;assigned object to target. I can identify range is the object, and i is the target. But can anyone be more specific? is 2 the start, and n+1 the increment? I come from Matlab but I have problem with this.<br />
<br />
May someone comment on that line, in a plain word? Thank you<br />
2) I want to restrict the limit here. I want to set range i = 1,10, because my ideal program (in a while loop is):<br />
while 1&lt;= n<br />
How do I restrict i in that for loop above?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>jwxie</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238580.html</guid>
		</item>
		<item>
			<title>(object) paramater</title>
			<link>http://www.daniweb.com/forums/thread238577.html</link>
			<pubDate>Sun, 15 Nov 2009 01:09:09 GMT</pubDate>
			<description><![CDATA[I'M reading the book "Python Programing second edition for the absolute beginner".  While explaining the object paramater whithin a class, this how it reads.  
 
Base your class on object , a fundamental, built-in type. 
 
Can someone please tell me what that means? 
Thanks.]]></description>
			<content:encoded><![CDATA[<div>I'M reading the book &quot;Python Programing second edition for the absolute beginner&quot;.  While explaining the object paramater whithin a class, this how it reads. <br />
<br />
Base your class on <span style="font-style:italic">object</span> , a fundamental, built-in type.<br />
<br />
Can someone please tell me what that means?<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238577.html</guid>
		</item>
		<item>
			<title>Help with parsing strings</title>
			<link>http://www.daniweb.com/forums/thread238569.html</link>
			<pubDate>Sat, 14 Nov 2009 23:54:22 GMT</pubDate>
			<description><![CDATA[I need to parse an assembly program.  I have no problems parsing a group of instructions or a group of instructions with one loop.  For example: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I need to parse an assembly program.  I have no problems parsing a group of instructions or a group of instructions with one loop.  For example:<br />
 <pre style="margin:20px; line-height:13px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LD&nbsp; &nbsp; R2,&nbsp; &nbsp;  0(R1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R4,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SD&nbsp; &nbsp; 0(R1),&nbsp; R4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADDI R1,&nbsp; &nbsp;  R1,&nbsp; &nbsp;  #-8<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R2,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R4<br />
or<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Loop: LD&nbsp; &nbsp; R2,&nbsp; &nbsp;  0(R1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R4,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SD&nbsp; &nbsp; 0(R1),&nbsp; R4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADDI R1,&nbsp; &nbsp;  R1,&nbsp; &nbsp;  #-8<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BNEZ&nbsp; R1,&nbsp; &nbsp;  Loop<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R2,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R4</pre><br />
<br />
My problem is when there are nested loops.  For example:<br />
 <pre style="margin:20px; line-height:13px">Loop: LD&nbsp; &nbsp; R2,&nbsp; &nbsp;  0(R1)<br />
&nbsp; &nbsp; &nbsp; Loop: LD&nbsp; &nbsp; R2,&nbsp; &nbsp;  0(R1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R4,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SD&nbsp; &nbsp; 0(R1),&nbsp; R4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADDI R1,&nbsp; &nbsp;  R1,&nbsp; &nbsp;  #-8<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BNEZ&nbsp; R1,&nbsp; &nbsp;  Loop<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DADD&nbsp; R2,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R4<br />
&nbsp; &nbsp;  DADD&nbsp; R4,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R3<br />
&nbsp; &nbsp;  SD&nbsp; &nbsp; 0(R1),&nbsp; R4<br />
&nbsp; &nbsp;  DADDI R1,&nbsp; &nbsp;  R1,&nbsp; &nbsp;  #-8<br />
&nbsp; &nbsp;  BNEZ&nbsp; R1,&nbsp; &nbsp;  Loop<br />
&nbsp; &nbsp;  DADD&nbsp; R2,&nbsp; &nbsp;  R2,&nbsp; &nbsp;  R4</pre>I was hoping that someone could provide some insight on how to parse the nested loop example.  I would like to split the nested loops into 2 separate lists, innerLoop and outerLoop. The only way I see to do this is to count the whitespace or indentation to break it up.  If anyone has a better idea, please let me know.  Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>nizbit</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238569.html</guid>
		</item>
		<item>
			<title>Python Quick Reference</title>
			<link>http://www.daniweb.com/forums/thread238554.html</link>
			<pubDate>Sat, 14 Nov 2009 22:34:47 GMT</pubDate>
			<description>Does anyone know where I can find a goo pdf python reference for the following? 
 
pre built constructors, 
 
functions/methods for the follwoing 
 
tuples, lists, dicts...etc 
 
I hate reading a book with nothing but quick explanation, I want to see them for myself. And I already know how to find...</description>
			<content:encoded><![CDATA[<div>Does anyone know where I can find a goo pdf python reference for the following?<br />
<br />
pre built constructors,<br />
<br />
functions/methods for the follwoing<br />
<br />
tuples, lists, dicts...etc<br />
<br />
I hate reading a book with nothing but quick explanation, I want to see them for myself. And I already know how to find them using dir().<br />
Thanks for any and all help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Garrett85</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238554.html</guid>
		</item>
		<item>
			<title>Tutorial Simple Regex tutorial</title>
			<link>http://www.daniweb.com/tutorials/tutorial238544.html</link>
			<pubDate>Sat, 14 Nov 2009 21:01:07 GMT</pubDate>
			<description><![CDATA[Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings. 
 
So first to use regex you must import it 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings.<br />
<br />
So first to use regex you must import it<br />
 <pre style="margin:20px; line-height:13px">import re</pre>This loads the module for us to use. <br />
<br />
Regex is a module designed to make strings easy to manipulate and is often used to check for correct input.<br />
<br />
For example<br />
 <pre style="margin:20px; line-height:13px">r = raw_input(&quot;Please enter an email address&quot;)</pre>But how do you know without complicated checking that they have entered the right format of <a href="mailto:something@something.com">something@something.com</a>? Well to check this normally we would need to index the '@' symbol, as well as make sure they had the right words (.com) and that it was all in the right order.<br />
<br />
But with regex we can work this out in one line... that is after working out the regex string. <br />
<br />
So lets start on the email.. <br />
First we have to understand what an email needs in it:<ol style="list-style-type: decimal"><li>A Beginning (xxxx@mail.com)</li>
<li>The '@' sign</li>
<li>a domain (mail@xxx.com)</li>
<li>and a .com (we are not going to make it for .orgs/anything else)</li>
</ol><br />
So lets start (please see below for explanation of symbols)<br />
 <pre style="margin:20px; line-height:13px">import re<br />
#Lets make a fake email...<br />
email = 'bogusemail123@sillymail.com'<br />
<br />
#to make a re pattern we use a string<br />
pattern = &quot;^[A-Za-z0-9.]+@[A-Za-z0-9.]+.com$&quot;<br />
<br />
#now we check if it matches<br />
re.findall(pattern, email)<br />
#Yes! it does<br />
#It returns [&quot;bogusemail123@sillymail.com&quot;]<br />
<br />
#lets try some other addresses<br />
re.findall(pattern,&quot;@sillymail.com&quot;)<br />
#returns []<br />
re.findall(pattern,&quot;bogusemail123@sillymail&quot;<br />
#returns []</pre>So this is a relatively simple example but you can easily see how it can save you time in checking that a user has inputted the correct things as well as searching for things in a string..<br />
<br />
Now to explain what <span style="font-weight:bold">&quot;^[A-Za-z0-9.]+@[A-Za-z0-9.]+.com$&quot;</span> means<ul><li>^ --&gt; means that the pattern starts at the start of the string, this means that &quot;Hello <a href="mailto:bogusmail123@sillymail.com">bogusmail123@sillymail.com</a>&quot; will not work</li>
<li>[A-Za-z0-9.] --&gt; This is called a range, it means that anything inside that range will match the string, so and letter of A-z or a-z as well as numbers 0-9 and a dot. This means that you do not get emails with other forms of punctuation in them.</li>
<li>+ --&gt; This does not mean plus, or anything like that, rather it means that whatever came before it needs to be in the string one time or more. In this case the thing before was our range, so what it means is that we need at least one letter/number/dot or more to have the string match</li>
<li>@ --&gt; For a match where you want it to match a character exactly you just put the character in the string in the place it is meant to be</li>
<li>[A-Za-z0-9.]+ --&gt; Just another range like we had before, with a '+' sign to mean it need one or more things in the range</li>
<li>.com$ --&gt; Then we put in exactly what we want at the end of the email address ('.com') and make sure it is at the end of the string with the dollar symbol. </li>
</ul><br />
Then to check that our string matches we use  <pre style="margin:20px; line-height:13px">re.findall(regexpatter, string)</pre> That lists all of the strings that match, in our case it should only come back with either a list with one email address or nothing at all if the input was incorrect.<br />
<br />
This will not get all email addresses its just a simple example designed to show people the possibilities of the regex module.<br />
<br />
If you want to extend yourself in this, try making it so that is accepts .org/.net/com.au etc.<br />
<br />
Hope you enjoyed the tutorial and learnt something :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238544.html</guid>
		</item>
		<item>
			<title>Connect 4 - Insert Coin</title>
			<link>http://www.daniweb.com/forums/thread238541.html</link>
			<pubDate>Sat, 14 Nov 2009 20:43:12 GMT</pubDate>
			<description><![CDATA[Hello. 
 
This time it might be a bit more complicated. 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with...]]></description>
			<content:encoded><![CDATA[<div>Hello.<br />
<br />
This time it might be a bit more complicated.<br />
<br />
 <pre style="margin:20px; line-height:13px">def start_game():<br />
&nbsp; &nbsp; &nbsp; &nbsp; global no_winner<br />
&nbsp; &nbsp; &nbsp; &nbsp; no_winner = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; rows_cols()<br />
&nbsp; &nbsp; &nbsp; &nbsp; global board<br />
&nbsp; &nbsp; &nbsp; &nbsp; board = make_board()<br />
&nbsp; &nbsp; &nbsp; &nbsp; print_board()<br />
&nbsp; &nbsp; &nbsp; &nbsp; player_select()<br />
<br />
def rows_cols():<br />
&nbsp; &nbsp; &nbsp; &nbsp; global rows<br />
&nbsp; &nbsp; &nbsp; &nbsp; global columns<br />
&nbsp; &nbsp; &nbsp; &nbsp; rows = int(raw_input('Height: '))<br />
&nbsp; &nbsp; &nbsp; &nbsp; columns = int(raw_input('Width: '))<br />
&nbsp; &nbsp; &nbsp; &nbsp; if rows &lt; 4:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rows = 4<br />
&nbsp; &nbsp; &nbsp; &nbsp; if columns &lt; 4:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; columns = 4<br />
<br />
def make_board():<br />
&nbsp; &nbsp; &nbsp; &nbsp; fielda = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; fieldb = []<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(columns):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldb.append('.')<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(rows):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fielda.append(fieldb)<br />
&nbsp; &nbsp; &nbsp; &nbsp; return fielda<br />
<br />
def print_board():<br />
&nbsp; &nbsp; &nbsp; &nbsp; global row<br />
&nbsp; &nbsp; &nbsp; &nbsp; global dot<br />
&nbsp; &nbsp; &nbsp; &nbsp; for row in board:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for dot in row:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print dot,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(columns):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print i,<br />
&nbsp; &nbsp; &nbsp; &nbsp; print<br />
<br />
def player_select():<br />
&nbsp; &nbsp; &nbsp; &nbsp; select = int(raw_input('Human enemy(1) or Computer enemy(2)?: '))<br />
&nbsp; &nbsp; &nbsp; &nbsp; if select == 1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select_1()<br />
&nbsp; &nbsp; &nbsp; &nbsp; elif select == 2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select_2()<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; player_select()<br />
<br />
def select_1():<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Player 1 = X'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Player 2 = O'<br />
&nbsp; &nbsp; &nbsp; &nbsp; while no_winner == True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; turn_player1()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; turn_player2()<br />
<br />
def select_2():<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Player&nbsp; = X'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Computer = O'<br />
&nbsp; &nbsp; &nbsp; &nbsp; while no_winner == True:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; turn_player1()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; turn_comp()<br />
<br />
def turn_player1():<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Turn Player 1'<br />
&nbsp; &nbsp; &nbsp; &nbsp; playchip = int(raw_input('Throw a coin in column: '))<br />
&nbsp; &nbsp; &nbsp; &nbsp; board[0][playchip] = 'X'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print_board()<br />
<br />
def turn_player2():<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Turn Player 2'<br />
&nbsp; &nbsp; &nbsp; &nbsp; playchip = int(raw_input('Throw a coin in column: '))<br />
&nbsp; &nbsp; &nbsp; &nbsp; board[0][playchip] = 'O'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print_board()<br />
<br />
def turn_comp():<br />
&nbsp; &nbsp; &nbsp; &nbsp; import random<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Turn Computer'<br />
&nbsp; &nbsp; &nbsp; &nbsp; playchip = random.randint(0, columns - 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; board[0][playchip] = 'O'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print_board()<br />
<br />
def dot_blank():<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(columns):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for i in range(rows):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if board[0][playchip] == '.':<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return False<br />
start_game()</pre><br />
. . . .<br />
. . . .<br />
. . . .<br />
. . . .<br />
0 1 2 3<br />
<br />
When I insert a Coin at  Position 0 the whole column is getting filled with the coin instead of a single 'dot' in the column. <br />
It looks like this:<br />
<br />
X . . .<br />
X . . .<br />
X . . .<br />
X . . .<br />
0 1 2 3<br />
<br />
Any ideas to fix this?<br />
<br />
Thanks in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sentinel123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238541.html</guid>
		</item>
		<item>
			<title>Connect4 - random.randint</title>
			<link>http://www.daniweb.com/forums/thread238528.html</link>
			<pubDate>Sat, 14 Nov 2009 19:13:08 GMT</pubDate>
			<description><![CDATA[Hello. 
 
Here I go again. 
 
I tried to create a computer enemy for my connect 4 game: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Hello.<br />
<br />
Here I go again.<br />
<br />
I tried to create a computer enemy for my connect 4 game:<br />
<br />
 <pre style="margin:20px; line-height:13px">def turn_comp():<br />
&nbsp; &nbsp; &nbsp; &nbsp; import random<br />
&nbsp; &nbsp; &nbsp; &nbsp; print 'Computer ist am Zug!'<br />
&nbsp; &nbsp; &nbsp; &nbsp; playchip = random.randint(0, columns)<br />
&nbsp; &nbsp; &nbsp; &nbsp; board[0][playchip] = 'O'<br />
&nbsp; &nbsp; &nbsp; &nbsp; print_board()</pre><br />
Even though I limited the range of randint with 0 and columns (in a 4x4 board columns = 4) the computer chooses a number out of range. <br />
<br />
Why? :P<br />
<br />
//Edit: If I limit the range to (0, columns - 1) it seems to work perfectly <br />
<br />
//Edit2: Is it because the list index starts with 0 (and not with 1)? I guess this is it...<br />
<br />
Thanks in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sentinel123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238528.html</guid>
		</item>
		<item>
			<title>moving the eye?</title>
			<link>http://www.daniweb.com/forums/thread238520.html</link>
			<pubDate>Sat, 14 Nov 2009 18:16:57 GMT</pubDate>
			<description>I want to be able to move the iris and the pupil of the eye, if I click on the left of the graphic window irrsepective of high or low  then it should move left and if i click on the right then if should move right. if i click above or below the eye it should look straight ahead. Here is my code for...</description>
			<content:encoded><![CDATA[<div>I want to be able to move the iris and the pupil of the eye, if I click on the left of the graphic window irrsepective of high or low  then it should move left and if i click on the right then if should move right. if i click above or below the eye it should look straight ahead. Here is my code for the eye..<br />
 <pre style="margin:20px; line-height:13px">from graphics import *<br />
def drawCircle(win, centre, radius, colour):<br />
&nbsp; &nbsp; circle = Circle(centre, radius)<br />
&nbsp; &nbsp; circle.setFill(colour)<br />
&nbsp; &nbsp; circle.setWidth(2)<br />
&nbsp; &nbsp; circle.draw(win)<br />
def drawEye():<br />
&nbsp; &nbsp; w = 250<br />
&nbsp; &nbsp; h = 250<br />
&nbsp; &nbsp; win = GraphWin(&quot;One Spooky Eye&quot;, w, h)<br />
&nbsp; &nbsp; # center should be at 1/2 width and height<br />
&nbsp; &nbsp; centre = Point(w//2, h//2)<br />
&nbsp; &nbsp; drawCircle(win, centre, 40, &quot;white&quot;)<br />
&nbsp; &nbsp; drawCircle(win, centre, 20, &quot;blue&quot;)<br />
&nbsp; &nbsp; drawCircle(win, centre, 10, &quot;black&quot;)<br />
&nbsp; &nbsp; # click mouse to go on<br />
&nbsp; &nbsp; win.getMouse() <br />
&nbsp; &nbsp; win.close()<br />
<br />
drawEye()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gangster88</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238520.html</guid>
		</item>
		<item>
			<title>Rock, papper, scissors</title>
			<link>http://www.daniweb.com/forums/thread238514.html</link>
			<pubDate>Sat, 14 Nov 2009 18:06:18 GMT</pubDate>
			<description><![CDATA[The function below is supposed to ask the user to enter a choice of rock paper or sciessors and output an error mesage if the user enters an invalid choice and then ouput a message if they won, drew or lost against the computer.  
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>The function below is supposed to ask the user to enter a choice of rock paper or sciessors and output an error mesage if the user enters an invalid choice and then ouput a message if they won, drew or lost against the computer. <br />
 <pre style="margin:20px; line-height:13px">def rockPaperScissors():<br />
&nbsp; &nbsp; import random<br />
&nbsp; &nbsp; choice=raw_input(&quot;please enter your choice: &quot;)<br />
&nbsp; &nbsp; computerIndex = random.randint(1,3)<br />
&nbsp; &nbsp; if computerIndex == 1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; computer = &quot;rock&quot;<br />
&nbsp; &nbsp; elif computerIndex == 2:<br />
&nbsp; &nbsp; &nbsp; &nbsp; computer = &quot;scissors&quot;<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; computer = &quot;paper&quot;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gangster88</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238514.html</guid>
		</item>
		<item>
			<title>starting video with parameters in python</title>
			<link>http://www.daniweb.com/forums/thread238507.html</link>
			<pubDate>Sat, 14 Nov 2009 16:55:50 GMT</pubDate>
			<description><![CDATA[*Bsplayer is a videoplayer. I want to start bsplayer with the parameter -stime-x, where x is the amount of seconds. This result in playing a movie from say 23 minutes 10 seconds with the parameter -stime=1390. The whole thing I can manage to do in _DOS_ and looks like: 
 
@echo off 
"c:\program...]]></description>
			<content:encoded><![CDATA[<div><span style="font-weight:bold">Bsplayer is a videoplayer. I want to start bsplayer with the parameter -stime-x, where x is the amount of seconds. This result in playing a movie from say 23 minutes 10 seconds with the parameter -stime=1390. The whole thing I can manage to do in <span style="color:Green"><span style="text-decoration:underline">DOS</span></span> and looks like:<br />
<br />
@echo off<br />
&quot;c:\program files\webteh\bsplayerpro\bsplayer.exe&quot; &quot;D:\rodin\rodin.mp4&quot; -stime=1390<br />
but whatever I try and search for on this forum and google of course<br />
<br />
I cannot settle this in <span style="color:Green"><span style="font-weight:bold"><span style="text-decoration:underline">python</span></span></span> code. <span style="color:Red">I want to hop to a interesting time positions in the vid with a menu</span>. What i have is this:<br />
<br />
 <pre style="margin:20px; line-height:13px">import webbrowser<br />
import os<br />
import win32api<br />
<br />
print 'Marko Rodin\n'<br />
print 'what starting time? '<br />
a=raw_input('hour:')<br />
b=raw_input('minutes, ')<br />
c=raw_input('seconds ')<br />
d=(int(a)*3600)+int(b)+int(c)<br />
&nbsp; <br />
#win32api.ShellExecute(0,&quot;open&quot;, &quot;Vortex Based Mathematics by Marko Rodin.mp4&quot;,&quot;-stime=1390&quot;,&quot;D:\\rodin&quot;,1) DOESNOT WORK<br />
os.execve(&quot;c:\\program files\\webteh\\bsplayerpro\\bsplayer.exe&quot;, [&quot;-stime=str(d)&quot;], &quot;d:\\rodin\\rodin.mp4&quot;) # TypeError: execve() arg 3 must be a mapping object</pre>What's wrong with this and is there another shorter way to start the vid in this manner?<br />
Thanks!</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>col415</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238507.html</guid>
		</item>
		<item>
			<title>for range function</title>
			<link>http://www.daniweb.com/forums/thread238491.html</link>
			<pubDate>Sat, 14 Nov 2009 13:18:11 GMT</pubDate>
			<description><![CDATA[Hi all, can anyone help me with writting the code that does: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help...]]></description>
			<content:encoded><![CDATA[<div>Hi all, can anyone help me with writting the code that does:<br />
 <pre style="margin:20px; line-height:13px">n=5<br />
for i in range(0,n,1):<br />
&nbsp; &nbsp; answer=a*i&nbsp; &nbsp; #a is an array,say([2,3,4])<br />
&nbsp; &nbsp; return answer</pre>basically I want compute a*i and return answers when i=0,1,2,3,4 ,and the answer should be a 3*n matrix, first row is when i=0, second row is when i=1, and so on.....<br />
thanks aloooot in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>XLL</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238491.html</guid>
		</item>
		<item>
			<title>How to check an IBAN bank account No.</title>
			<link>http://www.daniweb.com/forums/thread238464.html</link>
			<pubDate>Sat, 14 Nov 2009 10:20:42 GMT</pubDate>
			<description>Hi, 
 
I wrote this sample code to check the integrity of an IBAN (International Bank Account Number) bank account number. 
(See Wikipedia for further information) 
Any advice to simplify this? 
 
 
# 
# IBAN_Check.py 
# Utility to check the integrity of an IBAN bank account No.</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I wrote this sample code to check the integrity of an IBAN (International Bank Account Number) bank account number.<br />
(See Wikipedia for further information)<br />
Any advice to simplify this?<br />
<br />
 <pre style="margin:20px; line-height:13px">#<br />
# IBAN_Check.py<br />
# Utility to check the integrity of an IBAN bank account No.<br />
# Python 2.5.1<br />
<br />
# Sample IBAN account numbers.<br />
#-----------------------------<br />
# BE31435411161155<br />
# CH5108686001256515001<br />
# GB35MIDL40253432144670<br />
<br />
<br />
# Dictionaries - Refer to ISO 7064 mod 97-10 <br />
letter_dic={&quot;A&quot;:10, &quot;B&quot;:11, &quot;C&quot;:12, &quot;D&quot;:13, &quot;E&quot;:14, &quot;F&quot;:15, &quot;G&quot;:16, &quot;H&quot;:17, &quot;I&quot;:18, &quot;J&quot;:19, &quot;K&quot;:20, &quot;L&quot;:21, &quot;M&quot;:22,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;N&quot;:23, &quot;O&quot;:24, &quot;P&quot;:25, &quot;Q&quot;:26, &quot;R&quot;:27, &quot;S&quot;:28, &quot;T&quot;:29, &quot;U&quot;:30, &quot;V&quot;:31, &quot;W&quot;:32, &quot;X&quot;:33, &quot;Y&quot;:34, &quot;Z&quot;:35}<br />
<br />
# ISO 3166-1 alpha-2 country code<br />
country_dic={&quot;AL&quot;:&#91;28,&quot;Albania&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;AD&quot;:&#91;24,&quot;Andorra&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;AT&quot;:&#91;20,&quot;Austria&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;BE&quot;:&#91;16,&quot;Belgium&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;BA&quot;:&#91;20,&quot;Bosnia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;BG&quot;:&#91;22,&quot;Bulgaria&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;HR&quot;:&#91;21,&quot;Croatia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;CY&quot;:&#91;28,&quot;Cyprus&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;CZ&quot;:&#91;24,&quot;Czech Republic&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;DK&quot;:&#91;18,&quot;Denmark&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;EE&quot;:&#91;20,&quot;Estonia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;FO&quot;:&#91;18,&quot;Faroe Islands&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;FI&quot;:&#91;18,&quot;Finland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;FR&quot;:&#91;27,&quot;France&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;DE&quot;:&#91;22,&quot;Germany&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;GI&quot;:&#91;23,&quot;Gibraltar&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;GR&quot;:&#91;27,&quot;Greece&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;GL&quot;:&#91;18,&quot;Greenland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;HU&quot;:&#91;28,&quot;Hungary&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;IS&quot;:&#91;26,&quot;Iceland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;IE&quot;:&#91;22,&quot;Ireland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;IL&quot;:&#91;23,&quot;Israel&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;IT&quot;:&#91;27,&quot;Italy&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;LV&quot;:&#91;21,&quot;Latvia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;LI&quot;:&#91;21,&quot;Liechtenstein&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;LT&quot;:&#91;20,&quot;Lithuania&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;LU&quot;:&#91;20,&quot;Luxembourg&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MK&quot;:&#91;19,&quot;Macedonia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MT&quot;:&#91;31,&quot;Malta&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MU&quot;:&#91;30,&quot;Mauritius&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;MC&quot;:&#91;27,&quot;Monaco&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;ME&quot;:&#91;22,&quot;Montenegro&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;NL&quot;:&#91;18,&quot;Netherlands&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;NO&quot;:&#91;15,&quot;Northern Ireland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;PO&quot;:&#91;28,&quot;Poland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;PT&quot;:&#91;25,&quot;Portugal&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;RO&quot;:&#91;24,&quot;Romania&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;SM&quot;:&#91;27,&quot;San Marino&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;SA&quot;:&#91;24,&quot;Saudi Arabia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;RS&quot;:&#91;22,&quot;Serbia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;SK&quot;:&#91;24,&quot;Slovakia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;SI&quot;:&#91;19,&quot;Slovenia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;ES&quot;:&#91;24,&quot;Spain&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;SE&quot;:&#91;24,&quot;Sweden&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;CH&quot;:&#91;21,&quot;Switzerland&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;TR&quot;:&#91;26,&quot;Turkey&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;TN&quot;:&#91;24,&quot;Tunisia&quot;&#93;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;GB&quot;:&#91;22,&quot;United Kingdom&quot;&#93;}<br />
<br />
def check(n):<br />
&nbsp; &nbsp; if int(n)%97 !=1:<br />
&nbsp; &nbsp; &nbsp; &nbsp; result=0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # False<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; result=1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # True<br />
&nbsp; &nbsp; return result<br />
<br />
while True:<br />
&nbsp; &nbsp; # IBAN = (raw_input(&quot;Enter account No. : &quot;)).upper()&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Input account No.<br />
&nbsp; &nbsp; IBAN = &quot;GB35MIDL40253432144670&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # Sample UK IBAN<br />
&nbsp; &nbsp; length = len(IBAN)<br />
&nbsp; &nbsp; country = IBAN&#91;:2&#93;<br />
&nbsp; &nbsp; if country_dic.has_key(country):<br />
&nbsp; &nbsp; &nbsp; &nbsp; data = country_dic&#91;country&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; length_c = data&#91;0&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; name_c = data&#91;1&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if length == length_c:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print name_c,&quot;/ IBAN length&quot;,length_c,&quot;OK!&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header = IBAN&#91;:4&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # Get the first four characters<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; body = IBAN&#91;4:&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # And the remaining characters<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IBAN = body+header&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Move the first block at the end<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IBAN_ = list(IBAN)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Transform string into a list<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string_=&quot;&quot; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for index in range(len(IBAN_)):&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # Convert letters to integers<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if letter_dic.has_key(IBAN_&#91;index&#93;):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value = letter_dic&#91;IBAN_&#91;index&#93;&#93;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IBAN_&#91;index&#93; = value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for index in range(len(IBAN_)):&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # Transform list into a string<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string_ = string_ + str(IBAN_&#91;index&#93;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; valid = check(string_)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Check validity<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if not valid:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Not a valid IBAN account No.&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;IBAN account No. accepted.&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Rebuild the original IBAN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trailer = IBAN&#91;len(IBAN)-4:&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # Get the four last characters<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; body = IBAN&#91;:len(IBAN)-4&#93;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # And the remaining characters<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IBAN = trailer+body&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # Move the trailer at the begin<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Exit loop ...&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br />
&nbsp; &nbsp; &nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print name_c,&quot;/ Wrong IBAN code length!&quot;<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;Wrong IBAN country code!&quot;<br />
<br />
print &quot;IBAN account No. :&quot;,IBAN<br />
# Display a formated account No. (Thanks to Griboullis)<br />
split_IBAN = lambda block,string:&#91;string&#91;f:f+block&#93; for f in range(0,len(string),block)&#93;<br />
BankAccountNo = split_IBAN(4,IBAN)<br />
print &quot;Formated bank account No :&quot;,<br />
for block in BankAccountNo:<br />
&nbsp; &nbsp; print block,<br />
print</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>J-M DESMETTRE</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238464.html</guid>
		</item>
		<item>
			<title>ERROR Message</title>
			<link>http://www.daniweb.com/forums/thread238436.html</link>
			<pubDate>Sat, 14 Nov 2009 05:50:21 GMT</pubDate>
			<description><![CDATA[Hi, While running my Python Script I am getting "org.python.core.PyInstance" ERROR. I am not getting why this ERROR is coming. Please help......]]></description>
			<content:encoded><![CDATA[<div>Hi, While running my Python Script I am getting &quot;org.python.core.PyInstance&quot; ERROR. I am not getting why this ERROR is coming. Please help......</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>krishna_sicsr</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238436.html</guid>
		</item>
		<item>
			<title>Possible to import a module as an object attribute?</title>
			<link>http://www.daniweb.com/forums/thread238434.html</link>
			<pubDate>Sat, 14 Nov 2009 05:32:39 GMT</pubDate>
			<description><![CDATA[I'm just wondering if it is possible to import a module as an object attribute. 
 
The basic description of what I want to accomplish is that I'm creating a software agent object. This agent will have a set of abilities (functions), but I don't know what these are ahead of time. Logically, it is...]]></description>
			<content:encoded><![CDATA[<div>I'm just wondering if it is possible to import a module as an object attribute.<br />
<br />
The basic description of what I want to accomplish is that I'm creating a software agent object. This agent will have a set of abilities (functions), but I don't know what these are ahead of time. Logically, it is simplest to encapsulate these abilities in a module, and then have the agent import it. Then it would have access to these abilities. This would also allow it to use the standard modules or any other previously developed modules. Another benefit is that each object has its own namespace for modules. If all modules were in the global namespace of the program, every agent would have access to it. This is something I do not want.<br />
<br />
Now I obviously don't know how things work, so I resorted to perhaps one of the worse ways to code something: experimentation. The first thing I tried was to simply attempt to import a module as an object attribute. That failed. Then I checked to ensure that a module could indeed be imported to a local namespace. So I defined a class method that imported the random module, printed the local dictionary, and printed a random number. Then to ensure that the module was only accessible by that function, and not globally, I tried to print a random number in the main function. random was in the local dictionary for the test function, and it printed a random number. The main function raised an exception.<br />
<br />
I was going to try to add the module to the local dictionary of the agent, but I learned that local dictionaries cannot be modified. I'm not even sure that an object has a local dictionary anyway. So I was thinking about giving the agent another attribute, a dictionary with holding the agent's modules. That begs two questions. First, how would one call functions using such a dictionary? Second, how do I add modules to the dictionary? I was thinking you could define a method that sets the agent's module attribute as the result of a function that imports a given module, and returns the local dictionary. However, I'm inclined to believe this won't work. I believe objects in a function's local namespace cease to exist when that function exits.<br />
<br />
I tested my last assumption, and apparently you can return the locals of an object's method and store them in an attribute. I forgot that locals() returns a copy of the local dictionary. Now I just need to resolve how to call functions from the module name in the dictionary. I'll go ahead and post this while I'm working on it. Maybe someone will come up with an answer before or I do, or maybe I'm going about this the wrong way or there is a better way to do it.<br />
<br />
Thank you for reading this. Any help will be appreciated. Thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>lrh9</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238434.html</guid>
		</item>
		<item>
			<title>can python show the type/structure of a variable?</title>
			<link>http://www.daniweb.com/forums/thread238432.html</link>
			<pubDate>Sat, 14 Nov 2009 05:00:33 GMT</pubDate>
			<description><![CDATA[I am using BeautifulSoup for my project 
and I don't know how the object returned by the Soup is organized, 
so I don't know how to access it, except using only print 
 
I can only do this: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I am using BeautifulSoup for my project<br />
and I don't know how the object returned by the Soup is organized,<br />
so I don't know how to access it, except using only print<br />
<br />
I can only do this:<br />
 <pre style="margin:20px; line-height:13px">link = soup.find(attrs={'class' : re.compile(&quot;util2$&quot;)})<br />
print link</pre>it print out the whole &lt;a href......&gt; .... &lt;/a&gt;<br />
but I only want the address within it<br />
do anybody knows?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gunbuster363</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238432.html</guid>
		</item>
		<item>
			<title>Tutorial Useful input trick</title>
			<link>http://www.daniweb.com/tutorials/tutorial238423.html</link>
			<pubDate>Sat, 14 Nov 2009 04:06:05 GMT</pubDate>
			<description><![CDATA[!USING PYTHON 3.1! 
 
Hello DaniWeb! Today I'm going to teach you a cool variable trick that I learned. So here's an example: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680"...]]></description>
			<content:encoded><![CDATA[<div>!USING PYTHON 3.1!<br />
<br />
Hello DaniWeb! Today I'm going to teach you a cool variable trick that I learned. So here's an example:<br />
<br />
 <pre style="margin:20px; line-height:13px">a, b, c = input('?x?x?: ').split('x')</pre><br />
Now let's input something like:<br />
<br />
 <pre style="margin:20px; line-height:13px">&gt;&gt;&gt; a, b, c = input('?x?x?: ').split('x')<br />
?x?x?: 1x2x3</pre><br />
Now, variable 'a' is set to 1, variable 'b' is set to 2, variable 'c' is set to 3. I hope I explained that well enough. It can be used in various sections. NOTE: Because you used 3 variables, you <span style="font-weight:bold">have</span> to have three answers divided by the character you split with. If you only used 'a, b' you would only be able to do '1x2'. <br />
<br />
Now lets use another example using more common names:<br />
<br />
 <pre style="margin:20px; line-height:13px">breakfast, lunch, dinner = input('breakfast&amp;lunch&amp;dinner').split('&amp;')</pre><br />
Now if we run this in idle the result is:<br />
<br />
 <pre style="margin:20px; line-height:13px">&gt;&gt;&gt; breakfast, lunch, dinner = input('breakfast&amp;lunch&amp;dinner: ').split('&amp;')<br />
breakfast&amp;lunch&amp;dinner: sausage&amp;pizza&amp;chicken</pre><br />
Now:<br />
<br />
 <pre style="margin:20px; line-height:13px">breakfast = sausage<br />
lunch = pizza<br />
dinner = chicken</pre><br />
That's going to be it for this tutorial! Hope you find it useful!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>AutoPython</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238423.html</guid>
		</item>
		<item>
			<title>Unzip part of a .gz file using Python</title>
			<link>http://www.daniweb.com/forums/thread238401.html</link>
			<pubDate>Fri, 13 Nov 2009 23:04:33 GMT</pubDate>
			<description><![CDATA[So here's the problem. I have sample.gz file which is roughly 60KB in size. I want to decompress the first 2000 bytes off this file. I am running into CRC check failed error cuz I guess the gzip CRC field appears at the end of file, and it requires the entire gzipped file to decompress. Is there a...]]></description>
			<content:encoded><![CDATA[<div>So here's the problem. I have sample.gz file which is roughly 60KB in size. I want to decompress the first 2000 bytes off this file. I am running into CRC check failed error cuz I guess the gzip CRC field appears at the end of file, and it requires the entire gzipped file to decompress. Is there a way to get around this? I dont care about the CRC check. Even if I fail to decompress cuz of bad CRC, that is OK. Is there a way to get around this and unzip partial .gz files?<br />
<br />
The code I have so far is<br />
<br />
 <pre style="margin:20px; line-height:13px">import gzip<br />
import time<br />
import StringIO<br />
<br />
file = open('sample.gz', 'rb')<br />
mybuf = MyBuffer(file)<br />
mybuf = StringIO.StringIO(file.read(2000))<br />
f = gzip.GzipFile(fileobj=mybuf)<br />
data = f.read()<br />
print data</pre><br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>relb.test</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238401.html</guid>
		</item>
		<item>
			<title>Connect4 - Board gets bigger with every print</title>
			<link>http://www.daniweb.com/forums/thread238400.html</link>
			<pubDate>Fri, 13 Nov 2009 23:04:04 GMT</pubDate>
			<description><![CDATA[Hello. 
 
Here I am again with my Connect 4 project and another board problem. 
 
This is my code: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help...]]></description>
			<content:encoded><![CDATA[<div>Hello.<br />
<br />
Here I am again with my Connect 4 project and another board problem.<br />
<br />
This is my code:<br />
 <pre style="margin:20px; line-height:13px"><br />
fielda = []<br />
fieldb = []<br />
rows = int(raw_input('Height: '))<br />
columns = int(raw_input('Width: '))<br />
<br />
if rows &lt; 4:<br />
&nbsp; &nbsp; &nbsp; &nbsp; rows = 4<br />
if columns &lt; 4:<br />
&nbsp; &nbsp; &nbsp; &nbsp; columns = 4<br />
<br />
def print_board():<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(columns):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldb.append('.')<br />
&nbsp; &nbsp; &nbsp; &nbsp; for i in range(rows):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fielda.append(fieldb)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print ''.join(fieldb)<br />
<br />
print_board()<br />
print_board()<br />
print_board()</pre><br />
The first print_board( ) gives out the following (rows = 4, columns = 4):<br />
....<br />
....<br />
....<br />
....<br />
<br />
So far, so good.<br />
<br />
The second print_board() prints following: <br />
........<br />
........<br />
........<br />
........<br />
<br />
The third print_board():<br />
............<br />
............<br />
............<br />
............<br />
<br />
Question: Why is the board getting bigger even though nothing has been changed between the first and the last?<br />
Can anybody explain? <br />
Does anybody know how to solve this?(I don't want the board to get bigger)<br />
<br />
I don't have a clue what happens there...<br />
<br />
Thanks in advance!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sentinel123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238400.html</guid>
		</item>
		<item>
			<title>returnin object for use in another function help</title>
			<link>http://www.daniweb.com/forums/thread238390.html</link>
			<pubDate>Fri, 13 Nov 2009 22:15:29 GMT</pubDate>
			<description>Hi there, Im writing a program that takes a function and makes a plot of it. the program consists of 2 functions and each creates its own GraphWin. However i want to have a mouse click at the end close both windows. So i returned the window from the first function which i thought should allow it to...</description>
			<content:encoded><![CDATA[<div>Hi there, Im writing a program that takes a function and makes a plot of it. the program consists of 2 functions and each creates its own GraphWin. However i want to have a mouse click at the end close both windows. So i returned the window from the first function which i thought should allow it to be accessed and the close() method called, but I keep getting the error, &quot;NameError: global name 'graph' is not defined.&quot; I am not sure what I am doing wrong because all the rest works fine. Any help would be appreciated and thank you in advance.<br />
<br />
This is my code so far<br />
<br />
 <pre style="margin:20px; line-height:13px">from graphics import *<br />
from math import *<br />
<br />
<br />
def plot_it(x_start, x_end, y_start, y_end, f_of_x):<br />
&nbsp; &nbsp; x_start = float(x_start.getText())<br />
&nbsp; &nbsp; x_end = float(x_end.getText())<br />
&nbsp; &nbsp; y_start = float(y_start.getText())<br />
&nbsp; &nbsp; y_end = float(y_end.getText())<br />
&nbsp; &nbsp; f_of_x = f_of_x.getText()<br />
&nbsp; &nbsp; graph = GraphWin('Plot of f(x)', 400, 400)<br />
&nbsp; &nbsp; graph.setCoords(x_start, y_start, x_end, y_end)<br />
&nbsp; &nbsp; graph.setBackground('white')<br />
&nbsp; &nbsp; N = 101<br />
&nbsp; &nbsp; delta = (x_end - x_start) / (N - 1)<br />
&nbsp; &nbsp; points = []<br />
&nbsp; &nbsp; for i in range(N):<br />
&nbsp; &nbsp; &nbsp; &nbsp; x = x_start + i * delta<br />
&nbsp; &nbsp; &nbsp; &nbsp; y = eval(f_of_x)<br />
&nbsp; &nbsp; &nbsp; &nbsp; p = Point(x, y)<br />
&nbsp; &nbsp; &nbsp; &nbsp; points.append(p)<br />
&nbsp; &nbsp; &nbsp; &nbsp; for q in range(len(points) - 1):<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Line(points[q], points[q+1]).draw(graph)<br />
&nbsp; &nbsp; return graph<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
<br />
def main():<br />
&nbsp; &nbsp; win = GraphWin('Control', 400, 400)<br />
&nbsp; &nbsp; win.setCoords(0.0, 0.0, 2.0, 2.0)<br />
&nbsp; &nbsp; win.setBackground('white')<br />
<br />
&nbsp; &nbsp; Text(Point(0.25, 1.75), 'X start: ').draw(win)<br />
&nbsp; &nbsp; Text(Point(0.25, 1.5), 'X end: ').draw(win)<br />
&nbsp; &nbsp; Text(Point(1.25, 1.75), 'Y start: ').draw(win)<br />
&nbsp; &nbsp; Text(Point(1.25, 1.5), 'Y end: ').draw(win)<br />
&nbsp; &nbsp; Text(Point(0.40, 0.75), 'F(x): ').draw(win)<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; x_start = Entry(Point(0.85, 1.75), 10)<br />
&nbsp; &nbsp; x_start.setText('0.0')<br />
&nbsp; &nbsp; x_start.draw(win)<br />
<br />
&nbsp; &nbsp; x_end = Entry(Point(0.85, 1.5), 10)<br />
&nbsp; &nbsp; x_end.setText('0.0')<br />
&nbsp; &nbsp; x_end.draw(win)<br />
<br />
&nbsp; &nbsp; y_start = Entry(Point(1.75, 1.75), 10)<br />
&nbsp; &nbsp; y_start.setText('0.0')<br />
&nbsp; &nbsp; y_start.draw(win)<br />
<br />
&nbsp; &nbsp; y_end = Entry(Point(1.75, 1.5), 10)<br />
&nbsp; &nbsp; y_end.setText('0.0')<br />
&nbsp; &nbsp; y_end.draw(win)<br />
<br />
&nbsp; &nbsp; f_of_x = Entry(Point(1.0, 0.75), 20)<br />
&nbsp; &nbsp; f_of_x.setText('Enter a function')<br />
&nbsp; &nbsp; f_of_x.draw(win)<br />
<br />
&nbsp; &nbsp; t = Text(Point(1.0, 0.25), 'Plot f(x)')<br />
&nbsp; &nbsp; t.draw(win)<br />
&nbsp; &nbsp; Polygon(Point(0.75, 0.15), Point(0.75, 0.35), Point(1.25, 0.35), Point(1.25, 0.15)).draw(win)<br />
&nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; plot_it(x_start, x_end, y_start, y_end, f_of_x)<br />
&nbsp; &nbsp; t.setText('Close window')<br />
&nbsp; &nbsp; win.getMouse()<br />
&nbsp; &nbsp; win.close()<br />
&nbsp; &nbsp; graph.close()<br />
&nbsp; &nbsp; <br />
main()</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>jaymeaux77</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238390.html</guid>
		</item>
		<item>
			<title>Code Snippet Really Simple PlugIns Loader - Import all modules in a folder in one swoop</title>
			<link>http://www.daniweb.com/code/snippet238387.html</link>
			<pubDate>Fri, 13 Nov 2009 22:00:33 GMT</pubDate>
			<description><![CDATA[PlugIns in their simplest form can be just python modules that are dropped into some designated directory and dynamically loaded by the main application. This snippet can be used to do just that. 
 
*_Usage_* 
 
To load plugin modules: 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>PlugIns in their simplest form can be just python modules that are dropped into some designated directory and dynamically loaded by the main application. This snippet can be used to do just that.<br />
<br />
<span style="font-weight:bold"><span style="text-decoration:underline">Usage</span></span><br />
<br />
To load plugin modules:<br />
 <pre style="margin:20px; line-height:13px">&gt;&gt;&gt; plugins = importPluginModulesIn('mypackage')<br />
&gt;&gt;&gt; plugins<br />
{'foo': &lt;module 'foo' from 'mypackage\foo.py'&gt;, 'bar': &lt;module 'bar' from 'mypackage\bar.py'&gt;}</pre>To access a plugin attribute or method:<br />
 <pre style="margin:20px; line-height:13px">&gt;&gt;&gt; plugins['foo'].__name__<br />
'foo'</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>pythopian</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238387.html</guid>
		</item>
		<item>
			<title>GetBestSize()??</title>
			<link>http://www.daniweb.com/forums/thread238385.html</link>
			<pubDate>Fri, 13 Nov 2009 21:42:06 GMT</pubDate>
			<description>Hi, 
Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen? 
 
I used to be able to remember... but i forgot :P</description>
			<content:encoded><![CDATA[<div>Hi,<br />
Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen?<br />
<br />
I used to be able to remember... but i forgot :P</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Paul Thompson</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238385.html</guid>
		</item>
		<item>
			<title>problem in checking user input</title>
			<link>http://www.daniweb.com/forums/thread238362.html</link>
			<pubDate>Fri, 13 Nov 2009 19:12:19 GMT</pubDate>
			<description>I want to check the input of the user. 
Only positive nos are allowed. I want to pass the input of the user to a function which checks that if it is i positive no. then it allows the user to continue further otherwise it gives an error and asks the user if he would like to try again. if the user...</description>
			<content:encoded><![CDATA[<div>I want to check the input of the user.<br />
Only positive nos are allowed. I want to pass the input of the user to a function which checks that if it is i positive no. then it allows the user to continue further otherwise it gives an error and asks the user if he would like to try again. if the user enters yes the function should go back to my calling fucntion to ask the user a new input and if user enters no the program terminates. <br />
how do i do it? <br />
I know how to chek but m facing problem in going back to the calling statement n terminating the program.<br />
<br />
the calling statement is in the main part and i not a separate function</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sanchitgarg</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238362.html</guid>
		</item>
		<item>
			<title>calling differnent functions through a loop</title>
			<link>http://www.daniweb.com/forums/thread238329.html</link>
			<pubDate>Fri, 13 Nov 2009 17:35:43 GMT</pubDate>
			<description>suppose i have 10 different functions. 
 
i generate a random no. between 1 to 10. 
depending on its value i want to call the fucntion.  
eg. no. 3 call func, no. 8 calls func 8... etc. 
how do i do it using a loop without using the if else statement as it makes the code too long.</description>
			<content:encoded><![CDATA[<div>suppose i have 10 different functions.<br />
<br />
i generate a random no. between 1 to 10.<br />
depending on its value i want to call the fucntion. <br />
eg. no. 3 call func, no. 8 calls func 8... etc.<br />
how do i do it using a loop without using the if else statement as it makes the code too long.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>sanchitgarg</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238329.html</guid>
		</item>
		<item>
			<title>Python Maze</title>
			<link>http://www.daniweb.com/forums/thread238326.html</link>
			<pubDate>Fri, 13 Nov 2009 17:15:08 GMT</pubDate>
			<description>Okay, I need to write a maze solver for the maze in the text file (yes it is an assignment). I am not asking for a direct answer, I just want someone to propose ways of solving the maze( I also have to mark the paths taken in the maze). The problem is that I have learned nothing in the class the...</description>
			<content:encoded><![CDATA[<div>Okay, I need to write a maze solver for the maze in the text file (yes it is an assignment). I am not asking for a direct answer, I just want someone to propose ways of solving the maze( I also have to mark the paths taken in the maze). The problem is that I have learned nothing in the class the assignment is for because the professor tends to ramble on about anything from Star Trek jokes to WoW (seriously). As a result, I am completely lost on what to do on this assignment. The only code I have so far prints the maze:<br />
 <pre style="margin:20px; line-height:13px">def main():<br />
&nbsp; &nbsp; mazefile = open('Python Maze.txt','r+')<br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; for line in mazefile:<br />
&nbsp; &nbsp; &nbsp; &nbsp; line = line.strip()<br />
&nbsp; &nbsp; &nbsp; &nbsp; print line<br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; mazefile.close()<br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
<br />
main()</pre></div>  <br /> <div style="padding:5px">     <fieldset class="fieldset"> <legend>Attached Files</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/txt.gif" alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12553&amp;d=1258132262">Python Maze.txt</a> (209 Bytes)</td> </tr> </table> </fieldset>  </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>Findlebot</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238326.html</guid>
		</item>
		<item>
			<title>what happened with the for loop</title>
			<link>http://www.daniweb.com/forums/thread238316.html</link>
			<pubDate>Fri, 13 Nov 2009 16:45:59 GMT</pubDate>
			<description><![CDATA[Here is my code. 
If I use forloop to write, it got error: 
Traceback (most recent call last): 
  File "m.py", line 20, in <module> 
    f.write(tag[i].string) 
TypeError: argument 1 must be string or read-only character buffer, not None 
 
 
HOWEVER, if I don't use for loop, instead 
write as :...]]></description>
			<content:encoded><![CDATA[<div>Here is my code.<br />
If I use forloop to write, it got error:<br />
Traceback (most recent call last):<br />
  File &quot;m.py&quot;, line 20, in &lt;module&gt;<br />
    f.write(tag[i].string)<br />
TypeError: argument 1 must be string or read-only character buffer, not None<br />
<br />
<br />
HOWEVER, if I don't use for loop, instead<br />
write as : f.write(tag[1].string)<br />
it is ok, WHY??<br />
<br />
 <pre style="margin:20px; line-height:13px">from BeautifulSoup import BeautifulSoup<br />
import re<br />
import os<br />
import os.path<br />
import urllib2<br />
<br />
outfile='out.txt'<br />
<br />
file = urllib2.urlopen(&quot;http://www.tripadvisor.com/ShowUserReviews-g294217-d305813-r49043831-Langham_Place_Hong_Kong-Hong_Kong_Hong_Kong_Region.html#REVIEWS&quot;)<br />
<br />
soup = BeautifulSoup(file)<br />
tag=soup.findAll(id=re.compile(&quot;^review&quot;))<br />
<br />
if os.path.isfile(outfile):<br />
&nbsp; os.remove(outfile)<br />
f=open(outfile, 'a')<br />
<br />
<br />
for i in range(0,5):<br />
&nbsp; f.write(tag[i].string)</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gunbuster363</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238316.html</guid>
		</item>
		<item>
			<title>dict doesnt read properly</title>
			<link>http://www.daniweb.com/forums/thread238312.html</link>
			<pubDate>Fri, 13 Nov 2009 16:13:35 GMT</pubDate>
			<description><![CDATA[Hi I have this code currently: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div>...]]></description>
			<content:encoded><![CDATA[<div>Hi I have this code currently:<br />
<br />
 <pre style="margin:20px; line-height:13px">dict&nbsp; = open(&quot;dict.txt&quot;, &quot;r&quot;).readlines()<br />
print dict<br />
LETTERS={'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13, 'n':14, 'o':15, 'p':16, 'q':17, 'r':18, 's':19, 't':20, 'u':21, 'v':22, 'w':23, 'x':24, 'y':25, 'z':26}<br />
word_value=0<br />
lettersv=[]<br />
letterss=[]<br />
<br />
def main():<br />
&nbsp; &nbsp; word=raw_input('what is the word?')<br />
<br />
&nbsp; &nbsp; word=word.lower()<br />
&nbsp; &nbsp; for i in range(len(dict)):<br />
&nbsp; &nbsp; &nbsp; &nbsp; dict[i] = dict[i][0:len(dict[i])-2]<br />
<br />
&nbsp; &nbsp; if word in dict:<br />
&nbsp; &nbsp; &nbsp; &nbsp; for letter in word:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lettersv.append(LETTERS[letter])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; letterss.append(letter)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '*'*40<br />
&nbsp; &nbsp; &nbsp; &nbsp; print letterss<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '*'*40<br />
&nbsp; &nbsp; &nbsp; &nbsp; word_value=sum(lettersv)<br />
&nbsp; &nbsp; &nbsp; &nbsp; print lettersv, word_value<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '*'*40<br />
&nbsp; &nbsp; else:<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;that word is not in the english dictionary, sorry.&quot;<br />
<br />
while 1:<br />
&nbsp; &nbsp; main()</pre><br />
but whenever I try to test, it wont recognise words like 'english' Does anyone know how to fix this? thanks in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>leegeorg07</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238312.html</guid>
		</item>
		<item>
			<title>Cannot open() ??</title>
			<link>http://www.daniweb.com/forums/thread238300.html</link>
			<pubDate>Fri, 13 Nov 2009 15:26:49 GMT</pubDate>
			<description><![CDATA[I want to create a file and open it and write on it with f= open('out.txt', 'a') 
 
then it got error: 
  File "m.py", line 10, in <module> 
    f=open('./out.txt', 'a') 
IOError: [Errno 13] Permission denied: './out.txt' 
 
What happened??]]></description>
			<content:encoded><![CDATA[<div>I want to create a file and open it and write on it with f= open('out.txt', 'a')<br />
<br />
then it got error:<br />
  File &quot;m.py&quot;, line 10, in &lt;module&gt;<br />
    f=open('./out.txt', 'a')<br />
IOError: [Errno 13] Permission denied: './out.txt'<br />
<br />
What happened??<br />
<br />
<br />
I am using opensuse and was using a user account to edit and run the m.py file<br />
python2.6.4 version<br />
<br />
 <pre style="margin:20px; line-height:13px">from BeautifulSoup import BeautifulSoup<br />
import re<br />
import urllib2<br />
<br />
file = urllib2.urlopen(&quot;http://www.tripadvisor.com/ShowUserReviews-g294217-d305813-r49043831-Langham_Place_Hong_Kong-Hong_Kong_Hong_Kong_Region.html#REVIEWS&quot;)<br />
<br />
soup = BeautifulSoup(file)<br />
tag=soup.findAll(id=re.compile(&quot;^review&quot;))<br />
<br />
f=open('out.txt', 'a')<br />
<br />
<br />
str = tag[1].contents<br />
f.write(str)</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>gunbuster363</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238300.html</guid>
		</item>
		<item>
			<title>subprocess module?</title>
			<link>http://www.daniweb.com/forums/thread238273.html</link>
			<pubDate>Fri, 13 Nov 2009 13:24:37 GMT</pubDate>
			<description>Hi I have been trying to use the python subprocess module but I find the documentation for 2.6.4 vague, does anyone else know of good tutorials for it? thanks in advance</description>
			<content:encoded><![CDATA[<div>Hi I have been trying to use the python subprocess module but I find the documentation for 2.6.4 vague, does anyone else know of good tutorials for it? thanks in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum114.html">Python</category>
			<dc:creator>leegeorg07</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread238273.html</guid>
		</item>
	</channel>
</rss>
