It's me again with lots of cruises/campaigns, points and txt files but now I have additionally polygons to create.
This is my main script:
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">main</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># Step 1: find the source files to process</SPAN>
list_of_files<SPAN class="operator token">=</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
list_of_files <SPAN class="operator token">=</SPAN> FindFiles<SPAN class="punctuation token">(</SPAN>location_for_tables<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Step2: prozess each file to data for points</SPAN>
<SPAN class="keyword token">for</SPAN> each_file <SPAN class="keyword token">in</SPAN> list_of_files<SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># create and save sub tables</SPAN>
store_table<SPAN class="punctuation token">(</SPAN>each_file<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Step3: prozess each file to create a point in kivupoints</SPAN>
list_of_tables <SPAN class="operator token">=</SPAN> FindFiles<SPAN class="punctuation token">(</SPAN>DirOutTables<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">for</SPAN> each_table