#!/usr/bin/python # # # 7/13/2015 Paul Mattione # # # This script fixes the names of the TAGM-channels in the translation table. # This corresponds to the swapping done in tt_fix_tagm2.py, but in that script the names weren't fixed. # Also, give the names a physical meaning: before the names ranged from 1 -> 120, and did not correspond to columns/rows. # import sqlite3 as lite import sys import os import re import datetime if len(sys.argv) != 2: print "You must supply a SQLite DB file to modify!" sys.exit(0); # Connect to SQLite DB file db_filename = sys.argv[1] print "" print "opening SQLite DB file: %s" % db_filename print "---------------------------------------------" con = lite.connect(db_filename) with con: # Specify that next cursor should be "dictionary" # (i.e. python's hash map) so columns can be indexed # by name con.row_factory = lite.Row # Create Cursor cur = con.cursor() # Check that this TT file has not already been updated # First check that col1 has 6 entries while col2 has only 1 cur.execute("SELECT * FROM Channel WHERE name='TAGM-A-120'") Nrows = len( cur.fetchall() ) if Nrows == 0: print 'Fix has already been applied, exiting' sys.exit(-1) ######################################################################### ADCs ######################################################################### #COLUMNS cur.execute("UPDATE Channel SET name='TAGM-A-1' WHERE chanid=3") cur.execute("UPDATE Channel SET name='TAGM-A-2' WHERE chanid=2") cur.execute("UPDATE Channel SET name='TAGM-A-3' WHERE chanid=1") cur.execute("UPDATE Channel SET name='TAGM-A-4' WHERE chanid=6") cur.execute("UPDATE Channel SET name='TAGM-A-5' WHERE chanid=5") cur.execute("UPDATE Channel SET name='TAGM-A-6' WHERE chanid=4") cur.execute("UPDATE Channel SET name='TAGM-A-7' WHERE chanid=14") cur.execute("UPDATE Channel SET name='TAGM-A-8' WHERE chanid=13") cur.execute("UPDATE Channel SET name='TAGM-A-9' WHERE chanid=12") cur.execute("UPDATE Channel SET name='TAGM-A-10' WHERE chanid=17") cur.execute("UPDATE Channel SET name='TAGM-A-11' WHERE chanid=16") cur.execute("UPDATE Channel SET name='TAGM-A-12' WHERE chanid=15") cur.execute("UPDATE Channel SET name='TAGM-A-13' WHERE chanid=20") cur.execute("UPDATE Channel SET name='TAGM-A-14' WHERE chanid=19") cur.execute("UPDATE Channel SET name='TAGM-A-15' WHERE chanid=18") cur.execute("UPDATE Channel SET name='TAGM-A-16' WHERE chanid=23") cur.execute("UPDATE Channel SET name='TAGM-A-17' WHERE chanid=22") cur.execute("UPDATE Channel SET name='TAGM-A-18' WHERE chanid=21") cur.execute("UPDATE Channel SET name='TAGM-A-19' WHERE chanid=26") cur.execute("UPDATE Channel SET name='TAGM-A-20' WHERE chanid=25") cur.execute("UPDATE Channel SET name='TAGM-A-21' WHERE chanid=24") cur.execute("UPDATE Channel SET name='TAGM-A-22' WHERE chanid=29") cur.execute("UPDATE Channel SET name='TAGM-A-23' WHERE chanid=28") cur.execute("UPDATE Channel SET name='TAGM-A-24' WHERE chanid=27") cur.execute("UPDATE Channel SET name='TAGM-A-25' WHERE chanid=37") cur.execute("UPDATE Channel SET name='TAGM-A-26' WHERE chanid=36") cur.execute("UPDATE Channel SET name='TAGM-A-27' WHERE chanid=35") cur.execute("UPDATE Channel SET name='TAGM-A-28' WHERE chanid=40") cur.execute("UPDATE Channel SET name='TAGM-A-29' WHERE chanid=39") cur.execute("UPDATE Channel SET name='TAGM-A-30' WHERE chanid=38") cur.execute("UPDATE Channel SET name='TAGM-A-31' WHERE chanid=43") cur.execute("UPDATE Channel SET name='TAGM-A-32' WHERE chanid=42") cur.execute("UPDATE Channel SET name='TAGM-A-33' WHERE chanid=41") cur.execute("UPDATE Channel SET name='TAGM-A-34' WHERE chanid=46") cur.execute("UPDATE Channel SET name='TAGM-A-35' WHERE chanid=45") cur.execute("UPDATE Channel SET name='TAGM-A-36' WHERE chanid=44") cur.execute("UPDATE Channel SET name='TAGM-A-37' WHERE chanid=49") cur.execute("UPDATE Channel SET name='TAGM-A-38' WHERE chanid=48") cur.execute("UPDATE Channel SET name='TAGM-A-39' WHERE chanid=47") cur.execute("UPDATE Channel SET name='TAGM-A-40' WHERE chanid=52") cur.execute("UPDATE Channel SET name='TAGM-A-41' WHERE chanid=51") cur.execute("UPDATE Channel SET name='TAGM-A-42' WHERE chanid=50") cur.execute("UPDATE Channel SET name='TAGM-A-43' WHERE chanid=55") cur.execute("UPDATE Channel SET name='TAGM-A-44' WHERE chanid=54") cur.execute("UPDATE Channel SET name='TAGM-A-45' WHERE chanid=53") cur.execute("UPDATE Channel SET name='TAGM-A-46' WHERE chanid=58") cur.execute("UPDATE Channel SET name='TAGM-A-47' WHERE chanid=57") cur.execute("UPDATE Channel SET name='TAGM-A-48' WHERE chanid=56") cur.execute("UPDATE Channel SET name='TAGM-A-49' WHERE chanid=61") cur.execute("UPDATE Channel SET name='TAGM-A-50' WHERE chanid=60") cur.execute("UPDATE Channel SET name='TAGM-A-51' WHERE chanid=59") cur.execute("UPDATE Channel SET name='TAGM-A-52' WHERE chanid=64") cur.execute("UPDATE Channel SET name='TAGM-A-53' WHERE chanid=63") cur.execute("UPDATE Channel SET name='TAGM-A-54' WHERE chanid=62") cur.execute("UPDATE Channel SET name='TAGM-A-55' WHERE chanid=67") cur.execute("UPDATE Channel SET name='TAGM-A-56' WHERE chanid=66") cur.execute("UPDATE Channel SET name='TAGM-A-57' WHERE chanid=65") cur.execute("UPDATE Channel SET name='TAGM-A-58' WHERE chanid=70") cur.execute("UPDATE Channel SET name='TAGM-A-59' WHERE chanid=69") cur.execute("UPDATE Channel SET name='TAGM-A-60' WHERE chanid=68") cur.execute("UPDATE Channel SET name='TAGM-A-61' WHERE chanid=73") cur.execute("UPDATE Channel SET name='TAGM-A-62' WHERE chanid=72") cur.execute("UPDATE Channel SET name='TAGM-A-63' WHERE chanid=71") cur.execute("UPDATE Channel SET name='TAGM-A-64' WHERE chanid=76") cur.execute("UPDATE Channel SET name='TAGM-A-65' WHERE chanid=75") cur.execute("UPDATE Channel SET name='TAGM-A-66' WHERE chanid=74") cur.execute("UPDATE Channel SET name='TAGM-A-67' WHERE chanid=79") cur.execute("UPDATE Channel SET name='TAGM-A-68' WHERE chanid=78") cur.execute("UPDATE Channel SET name='TAGM-A-69' WHERE chanid=77") cur.execute("UPDATE Channel SET name='TAGM-A-70' WHERE chanid=82") cur.execute("UPDATE Channel SET name='TAGM-A-71' WHERE chanid=81") cur.execute("UPDATE Channel SET name='TAGM-A-72' WHERE chanid=80") cur.execute("UPDATE Channel SET name='TAGM-A-73' WHERE chanid=85") cur.execute("UPDATE Channel SET name='TAGM-A-74' WHERE chanid=84") cur.execute("UPDATE Channel SET name='TAGM-A-75' WHERE chanid=83") cur.execute("UPDATE Channel SET name='TAGM-A-76' WHERE chanid=88") cur.execute("UPDATE Channel SET name='TAGM-A-77' WHERE chanid=87") cur.execute("UPDATE Channel SET name='TAGM-A-78' WHERE chanid=86") cur.execute("UPDATE Channel SET name='TAGM-A-79' WHERE chanid=96") cur.execute("UPDATE Channel SET name='TAGM-A-80' WHERE chanid=95") cur.execute("UPDATE Channel SET name='TAGM-A-81' WHERE chanid=94") cur.execute("UPDATE Channel SET name='TAGM-A-82' WHERE chanid=99") cur.execute("UPDATE Channel SET name='TAGM-A-83' WHERE chanid=98") cur.execute("UPDATE Channel SET name='TAGM-A-84' WHERE chanid=97") cur.execute("UPDATE Channel SET name='TAGM-A-85' WHERE chanid=102") cur.execute("UPDATE Channel SET name='TAGM-A-86' WHERE chanid=101") cur.execute("UPDATE Channel SET name='TAGM-A-87' WHERE chanid=100") cur.execute("UPDATE Channel SET name='TAGM-A-88' WHERE chanid=105") cur.execute("UPDATE Channel SET name='TAGM-A-89' WHERE chanid=104") cur.execute("UPDATE Channel SET name='TAGM-A-90' WHERE chanid=103") cur.execute("UPDATE Channel SET name='TAGM-A-91' WHERE chanid=108") cur.execute("UPDATE Channel SET name='TAGM-A-92' WHERE chanid=107") cur.execute("UPDATE Channel SET name='TAGM-A-93' WHERE chanid=106") cur.execute("UPDATE Channel SET name='TAGM-A-94' WHERE chanid=111") cur.execute("UPDATE Channel SET name='TAGM-A-95' WHERE chanid=110") cur.execute("UPDATE Channel SET name='TAGM-A-96' WHERE chanid=109") cur.execute("UPDATE Channel SET name='TAGM-A-97' WHERE chanid=119") cur.execute("UPDATE Channel SET name='TAGM-A-98' WHERE chanid=118") cur.execute("UPDATE Channel SET name='TAGM-A-99' WHERE chanid=117") cur.execute("UPDATE Channel SET name='TAGM-A-100' WHERE chanid=120") #ROWS cur.execute("UPDATE Channel SET name='TAGM-A-9-1' WHERE chanid=7") cur.execute("UPDATE Channel SET name='TAGM-A-9-2' WHERE chanid=8") cur.execute("UPDATE Channel SET name='TAGM-A-9-3' WHERE chanid=9") cur.execute("UPDATE Channel SET name='TAGM-A-9-4' WHERE chanid=10") cur.execute("UPDATE Channel SET name='TAGM-A-9-5' WHERE chanid=11") cur.execute("UPDATE Channel SET name='TAGM-A-27-1' WHERE chanid=30") cur.execute("UPDATE Channel SET name='TAGM-A-27-2' WHERE chanid=31") cur.execute("UPDATE Channel SET name='TAGM-A-27-3' WHERE chanid=32") cur.execute("UPDATE Channel SET name='TAGM-A-27-4' WHERE chanid=33") cur.execute("UPDATE Channel SET name='TAGM-A-27-5' WHERE chanid=34") cur.execute("UPDATE Channel SET name='TAGM-A-81-1' WHERE chanid=89") cur.execute("UPDATE Channel SET name='TAGM-A-81-2' WHERE chanid=90") cur.execute("UPDATE Channel SET name='TAGM-A-81-3' WHERE chanid=91") cur.execute("UPDATE Channel SET name='TAGM-A-81-4' WHERE chanid=92") cur.execute("UPDATE Channel SET name='TAGM-A-81-5' WHERE chanid=93") cur.execute("UPDATE Channel SET name='TAGM-A-99-1' WHERE chanid=112") cur.execute("UPDATE Channel SET name='TAGM-A-99-2' WHERE chanid=113") cur.execute("UPDATE Channel SET name='TAGM-A-99-3' WHERE chanid=114") cur.execute("UPDATE Channel SET name='TAGM-A-99-4' WHERE chanid=115") cur.execute("UPDATE Channel SET name='TAGM-A-99-5' WHERE chanid=116") ######################################################################### TDCs ######################################################################### #COLUMNS cur.execute("UPDATE Channel SET name='TAGM-T-1' WHERE chanid=499") cur.execute("UPDATE Channel SET name='TAGM-T-2' WHERE chanid=498") cur.execute("UPDATE Channel SET name='TAGM-T-3' WHERE chanid=497") cur.execute("UPDATE Channel SET name='TAGM-T-4' WHERE chanid=502") cur.execute("UPDATE Channel SET name='TAGM-T-5' WHERE chanid=501") cur.execute("UPDATE Channel SET name='TAGM-T-6' WHERE chanid=500") cur.execute("UPDATE Channel SET name='TAGM-T-7' WHERE chanid=510") cur.execute("UPDATE Channel SET name='TAGM-T-8' WHERE chanid=509") cur.execute("UPDATE Channel SET name='TAGM-T-9' WHERE chanid=508") cur.execute("UPDATE Channel SET name='TAGM-T-10' WHERE chanid=513") cur.execute("UPDATE Channel SET name='TAGM-T-11' WHERE chanid=512") cur.execute("UPDATE Channel SET name='TAGM-T-12' WHERE chanid=511") cur.execute("UPDATE Channel SET name='TAGM-T-13' WHERE chanid=516") cur.execute("UPDATE Channel SET name='TAGM-T-14' WHERE chanid=515") cur.execute("UPDATE Channel SET name='TAGM-T-15' WHERE chanid=514") cur.execute("UPDATE Channel SET name='TAGM-T-16' WHERE chanid=519") cur.execute("UPDATE Channel SET name='TAGM-T-17' WHERE chanid=518") cur.execute("UPDATE Channel SET name='TAGM-T-18' WHERE chanid=517") cur.execute("UPDATE Channel SET name='TAGM-T-19' WHERE chanid=522") cur.execute("UPDATE Channel SET name='TAGM-T-20' WHERE chanid=521") cur.execute("UPDATE Channel SET name='TAGM-T-21' WHERE chanid=520") cur.execute("UPDATE Channel SET name='TAGM-T-22' WHERE chanid=525") cur.execute("UPDATE Channel SET name='TAGM-T-23' WHERE chanid=524") cur.execute("UPDATE Channel SET name='TAGM-T-24' WHERE chanid=523") cur.execute("UPDATE Channel SET name='TAGM-T-25' WHERE chanid=533") cur.execute("UPDATE Channel SET name='TAGM-T-26' WHERE chanid=532") cur.execute("UPDATE Channel SET name='TAGM-T-27' WHERE chanid=531") cur.execute("UPDATE Channel SET name='TAGM-T-28' WHERE chanid=536") cur.execute("UPDATE Channel SET name='TAGM-T-29' WHERE chanid=535") cur.execute("UPDATE Channel SET name='TAGM-T-30' WHERE chanid=534") cur.execute("UPDATE Channel SET name='TAGM-T-31' WHERE chanid=539") cur.execute("UPDATE Channel SET name='TAGM-T-32' WHERE chanid=538") cur.execute("UPDATE Channel SET name='TAGM-T-33' WHERE chanid=537") cur.execute("UPDATE Channel SET name='TAGM-T-34' WHERE chanid=542") cur.execute("UPDATE Channel SET name='TAGM-T-35' WHERE chanid=541") cur.execute("UPDATE Channel SET name='TAGM-T-36' WHERE chanid=540") cur.execute("UPDATE Channel SET name='TAGM-T-37' WHERE chanid=545") cur.execute("UPDATE Channel SET name='TAGM-T-38' WHERE chanid=544") cur.execute("UPDATE Channel SET name='TAGM-T-39' WHERE chanid=543") cur.execute("UPDATE Channel SET name='TAGM-T-40' WHERE chanid=548") cur.execute("UPDATE Channel SET name='TAGM-T-41' WHERE chanid=547") cur.execute("UPDATE Channel SET name='TAGM-T-42' WHERE chanid=546") cur.execute("UPDATE Channel SET name='TAGM-T-43' WHERE chanid=551") cur.execute("UPDATE Channel SET name='TAGM-T-44' WHERE chanid=550") cur.execute("UPDATE Channel SET name='TAGM-T-45' WHERE chanid=549") cur.execute("UPDATE Channel SET name='TAGM-T-46' WHERE chanid=554") cur.execute("UPDATE Channel SET name='TAGM-T-47' WHERE chanid=553") cur.execute("UPDATE Channel SET name='TAGM-T-48' WHERE chanid=552") cur.execute("UPDATE Channel SET name='TAGM-T-49' WHERE chanid=557") cur.execute("UPDATE Channel SET name='TAGM-T-50' WHERE chanid=556") cur.execute("UPDATE Channel SET name='TAGM-T-51' WHERE chanid=555") cur.execute("UPDATE Channel SET name='TAGM-T-52' WHERE chanid=560") cur.execute("UPDATE Channel SET name='TAGM-T-53' WHERE chanid=559") cur.execute("UPDATE Channel SET name='TAGM-T-54' WHERE chanid=558") cur.execute("UPDATE Channel SET name='TAGM-T-55' WHERE chanid=563") cur.execute("UPDATE Channel SET name='TAGM-T-56' WHERE chanid=562") cur.execute("UPDATE Channel SET name='TAGM-T-57' WHERE chanid=561") cur.execute("UPDATE Channel SET name='TAGM-T-58' WHERE chanid=566") cur.execute("UPDATE Channel SET name='TAGM-T-59' WHERE chanid=565") cur.execute("UPDATE Channel SET name='TAGM-T-60' WHERE chanid=564") cur.execute("UPDATE Channel SET name='TAGM-T-61' WHERE chanid=569") cur.execute("UPDATE Channel SET name='TAGM-T-62' WHERE chanid=568") cur.execute("UPDATE Channel SET name='TAGM-T-63' WHERE chanid=567") cur.execute("UPDATE Channel SET name='TAGM-T-64' WHERE chanid=572") cur.execute("UPDATE Channel SET name='TAGM-T-65' WHERE chanid=571") cur.execute("UPDATE Channel SET name='TAGM-T-66' WHERE chanid=570") cur.execute("UPDATE Channel SET name='TAGM-T-67' WHERE chanid=575") cur.execute("UPDATE Channel SET name='TAGM-T-68' WHERE chanid=574") cur.execute("UPDATE Channel SET name='TAGM-T-69' WHERE chanid=573") cur.execute("UPDATE Channel SET name='TAGM-T-70' WHERE chanid=578") cur.execute("UPDATE Channel SET name='TAGM-T-71' WHERE chanid=577") cur.execute("UPDATE Channel SET name='TAGM-T-72' WHERE chanid=576") cur.execute("UPDATE Channel SET name='TAGM-T-73' WHERE chanid=581") cur.execute("UPDATE Channel SET name='TAGM-T-74' WHERE chanid=580") cur.execute("UPDATE Channel SET name='TAGM-T-75' WHERE chanid=579") cur.execute("UPDATE Channel SET name='TAGM-T-76' WHERE chanid=584") cur.execute("UPDATE Channel SET name='TAGM-T-77' WHERE chanid=583") cur.execute("UPDATE Channel SET name='TAGM-T-78' WHERE chanid=582") cur.execute("UPDATE Channel SET name='TAGM-T-79' WHERE chanid=592") cur.execute("UPDATE Channel SET name='TAGM-T-80' WHERE chanid=591") cur.execute("UPDATE Channel SET name='TAGM-T-81' WHERE chanid=590") cur.execute("UPDATE Channel SET name='TAGM-T-82' WHERE chanid=595") cur.execute("UPDATE Channel SET name='TAGM-T-83' WHERE chanid=594") cur.execute("UPDATE Channel SET name='TAGM-T-84' WHERE chanid=593") cur.execute("UPDATE Channel SET name='TAGM-T-85' WHERE chanid=598") cur.execute("UPDATE Channel SET name='TAGM-T-86' WHERE chanid=597") cur.execute("UPDATE Channel SET name='TAGM-T-87' WHERE chanid=596") cur.execute("UPDATE Channel SET name='TAGM-T-88' WHERE chanid=601") cur.execute("UPDATE Channel SET name='TAGM-T-89' WHERE chanid=600") cur.execute("UPDATE Channel SET name='TAGM-T-90' WHERE chanid=599") cur.execute("UPDATE Channel SET name='TAGM-T-91' WHERE chanid=604") cur.execute("UPDATE Channel SET name='TAGM-T-92' WHERE chanid=603") cur.execute("UPDATE Channel SET name='TAGM-T-93' WHERE chanid=602") cur.execute("UPDATE Channel SET name='TAGM-T-94' WHERE chanid=607") cur.execute("UPDATE Channel SET name='TAGM-T-95' WHERE chanid=606") cur.execute("UPDATE Channel SET name='TAGM-T-96' WHERE chanid=605") cur.execute("UPDATE Channel SET name='TAGM-T-97' WHERE chanid=615") cur.execute("UPDATE Channel SET name='TAGM-T-98' WHERE chanid=614") cur.execute("UPDATE Channel SET name='TAGM-T-99' WHERE chanid=613") cur.execute("UPDATE Channel SET name='TAGM-T-100' WHERE chanid=616") #ROWS cur.execute("UPDATE Channel SET name='TAGM-T-9-1' WHERE chanid=503") cur.execute("UPDATE Channel SET name='TAGM-T-9-2' WHERE chanid=504") cur.execute("UPDATE Channel SET name='TAGM-T-9-3' WHERE chanid=505") cur.execute("UPDATE Channel SET name='TAGM-T-9-4' WHERE chanid=506") cur.execute("UPDATE Channel SET name='TAGM-T-9-5' WHERE chanid=507") cur.execute("UPDATE Channel SET name='TAGM-T-27-1' WHERE chanid=526") cur.execute("UPDATE Channel SET name='TAGM-T-27-2' WHERE chanid=527") cur.execute("UPDATE Channel SET name='TAGM-T-27-3' WHERE chanid=528") cur.execute("UPDATE Channel SET name='TAGM-T-27-4' WHERE chanid=529") cur.execute("UPDATE Channel SET name='TAGM-T-27-5' WHERE chanid=530") cur.execute("UPDATE Channel SET name='TAGM-T-81-1' WHERE chanid=585") cur.execute("UPDATE Channel SET name='TAGM-T-81-2' WHERE chanid=586") cur.execute("UPDATE Channel SET name='TAGM-T-81-3' WHERE chanid=587") cur.execute("UPDATE Channel SET name='TAGM-T-81-4' WHERE chanid=588") cur.execute("UPDATE Channel SET name='TAGM-T-81-5' WHERE chanid=589") cur.execute("UPDATE Channel SET name='TAGM-T-99-1' WHERE chanid=608") cur.execute("UPDATE Channel SET name='TAGM-T-99-2' WHERE chanid=609") cur.execute("UPDATE Channel SET name='TAGM-T-99-3' WHERE chanid=610") cur.execute("UPDATE Channel SET name='TAGM-T-99-4' WHERE chanid=611") cur.execute("UPDATE Channel SET name='TAGM-T-99-5' WHERE chanid=612") ######################################################################## DISCs ######################################################################### #COLUMNS cur.execute("UPDATE Channel SET name='TAGM-T-1' WHERE chanid=371") cur.execute("UPDATE Channel SET name='TAGM-T-2' WHERE chanid=370") cur.execute("UPDATE Channel SET name='TAGM-T-3' WHERE chanid=369") cur.execute("UPDATE Channel SET name='TAGM-T-4' WHERE chanid=374") cur.execute("UPDATE Channel SET name='TAGM-T-5' WHERE chanid=373") cur.execute("UPDATE Channel SET name='TAGM-T-6' WHERE chanid=372") cur.execute("UPDATE Channel SET name='TAGM-T-7' WHERE chanid=382") cur.execute("UPDATE Channel SET name='TAGM-T-8' WHERE chanid=381") cur.execute("UPDATE Channel SET name='TAGM-T-9' WHERE chanid=380") cur.execute("UPDATE Channel SET name='TAGM-T-10' WHERE chanid=385") # cur.execute("UPDATE Channel SET name='TAGM-T-11' WHERE chanid=384") cur.execute("UPDATE Channel SET name='TAGM-T-12' WHERE chanid=383") cur.execute("UPDATE Channel SET name='TAGM-T-13' WHERE chanid=388") cur.execute("UPDATE Channel SET name='TAGM-T-14' WHERE chanid=387") cur.execute("UPDATE Channel SET name='TAGM-T-15' WHERE chanid=386") cur.execute("UPDATE Channel SET name='TAGM-T-16' WHERE chanid=391") cur.execute("UPDATE Channel SET name='TAGM-T-17' WHERE chanid=390") cur.execute("UPDATE Channel SET name='TAGM-T-18' WHERE chanid=389") cur.execute("UPDATE Channel SET name='TAGM-T-19' WHERE chanid=394") cur.execute("UPDATE Channel SET name='TAGM-T-20' WHERE chanid=393") # cur.execute("UPDATE Channel SET name='TAGM-T-21' WHERE chanid=392") cur.execute("UPDATE Channel SET name='TAGM-T-22' WHERE chanid=397") cur.execute("UPDATE Channel SET name='TAGM-T-23' WHERE chanid=396") cur.execute("UPDATE Channel SET name='TAGM-T-24' WHERE chanid=395") cur.execute("UPDATE Channel SET name='TAGM-T-25' WHERE chanid=405") cur.execute("UPDATE Channel SET name='TAGM-T-26' WHERE chanid=404") cur.execute("UPDATE Channel SET name='TAGM-T-27' WHERE chanid=403") cur.execute("UPDATE Channel SET name='TAGM-T-28' WHERE chanid=408") cur.execute("UPDATE Channel SET name='TAGM-T-29' WHERE chanid=407") cur.execute("UPDATE Channel SET name='TAGM-T-30' WHERE chanid=406") # cur.execute("UPDATE Channel SET name='TAGM-T-31' WHERE chanid=411") cur.execute("UPDATE Channel SET name='TAGM-T-32' WHERE chanid=410") cur.execute("UPDATE Channel SET name='TAGM-T-33' WHERE chanid=409") cur.execute("UPDATE Channel SET name='TAGM-T-34' WHERE chanid=414") cur.execute("UPDATE Channel SET name='TAGM-T-35' WHERE chanid=413") cur.execute("UPDATE Channel SET name='TAGM-T-36' WHERE chanid=412") cur.execute("UPDATE Channel SET name='TAGM-T-37' WHERE chanid=417") cur.execute("UPDATE Channel SET name='TAGM-T-38' WHERE chanid=416") cur.execute("UPDATE Channel SET name='TAGM-T-39' WHERE chanid=415") cur.execute("UPDATE Channel SET name='TAGM-T-40' WHERE chanid=420") # cur.execute("UPDATE Channel SET name='TAGM-T-41' WHERE chanid=419") cur.execute("UPDATE Channel SET name='TAGM-T-42' WHERE chanid=418") cur.execute("UPDATE Channel SET name='TAGM-T-43' WHERE chanid=423") cur.execute("UPDATE Channel SET name='TAGM-T-44' WHERE chanid=422") cur.execute("UPDATE Channel SET name='TAGM-T-45' WHERE chanid=421") cur.execute("UPDATE Channel SET name='TAGM-T-46' WHERE chanid=426") cur.execute("UPDATE Channel SET name='TAGM-T-47' WHERE chanid=425") cur.execute("UPDATE Channel SET name='TAGM-T-48' WHERE chanid=424") cur.execute("UPDATE Channel SET name='TAGM-T-49' WHERE chanid=429") cur.execute("UPDATE Channel SET name='TAGM-T-50' WHERE chanid=428") # cur.execute("UPDATE Channel SET name='TAGM-T-51' WHERE chanid=427") cur.execute("UPDATE Channel SET name='TAGM-T-52' WHERE chanid=432") cur.execute("UPDATE Channel SET name='TAGM-T-53' WHERE chanid=431") cur.execute("UPDATE Channel SET name='TAGM-T-54' WHERE chanid=430") cur.execute("UPDATE Channel SET name='TAGM-T-55' WHERE chanid=435") cur.execute("UPDATE Channel SET name='TAGM-T-56' WHERE chanid=434") cur.execute("UPDATE Channel SET name='TAGM-T-57' WHERE chanid=433") cur.execute("UPDATE Channel SET name='TAGM-T-58' WHERE chanid=438") cur.execute("UPDATE Channel SET name='TAGM-T-59' WHERE chanid=437") cur.execute("UPDATE Channel SET name='TAGM-T-60' WHERE chanid=436") # cur.execute("UPDATE Channel SET name='TAGM-T-61' WHERE chanid=441") cur.execute("UPDATE Channel SET name='TAGM-T-62' WHERE chanid=440") cur.execute("UPDATE Channel SET name='TAGM-T-63' WHERE chanid=439") cur.execute("UPDATE Channel SET name='TAGM-T-64' WHERE chanid=444") cur.execute("UPDATE Channel SET name='TAGM-T-65' WHERE chanid=443") cur.execute("UPDATE Channel SET name='TAGM-T-66' WHERE chanid=442") cur.execute("UPDATE Channel SET name='TAGM-T-67' WHERE chanid=447") cur.execute("UPDATE Channel SET name='TAGM-T-68' WHERE chanid=446") cur.execute("UPDATE Channel SET name='TAGM-T-69' WHERE chanid=445") cur.execute("UPDATE Channel SET name='TAGM-T-70' WHERE chanid=450") # cur.execute("UPDATE Channel SET name='TAGM-T-71' WHERE chanid=449") cur.execute("UPDATE Channel SET name='TAGM-T-72' WHERE chanid=448") cur.execute("UPDATE Channel SET name='TAGM-T-73' WHERE chanid=453") cur.execute("UPDATE Channel SET name='TAGM-T-74' WHERE chanid=452") cur.execute("UPDATE Channel SET name='TAGM-T-75' WHERE chanid=451") cur.execute("UPDATE Channel SET name='TAGM-T-76' WHERE chanid=456") cur.execute("UPDATE Channel SET name='TAGM-T-77' WHERE chanid=455") cur.execute("UPDATE Channel SET name='TAGM-T-78' WHERE chanid=454") cur.execute("UPDATE Channel SET name='TAGM-T-79' WHERE chanid=464") cur.execute("UPDATE Channel SET name='TAGM-T-80' WHERE chanid=463") # cur.execute("UPDATE Channel SET name='TAGM-T-81' WHERE chanid=462") cur.execute("UPDATE Channel SET name='TAGM-T-82' WHERE chanid=467") cur.execute("UPDATE Channel SET name='TAGM-T-83' WHERE chanid=466") cur.execute("UPDATE Channel SET name='TAGM-T-84' WHERE chanid=465") cur.execute("UPDATE Channel SET name='TAGM-T-85' WHERE chanid=470") cur.execute("UPDATE Channel SET name='TAGM-T-86' WHERE chanid=469") cur.execute("UPDATE Channel SET name='TAGM-T-87' WHERE chanid=468") cur.execute("UPDATE Channel SET name='TAGM-T-88' WHERE chanid=473") cur.execute("UPDATE Channel SET name='TAGM-T-89' WHERE chanid=472") cur.execute("UPDATE Channel SET name='TAGM-T-90' WHERE chanid=471") # cur.execute("UPDATE Channel SET name='TAGM-T-91' WHERE chanid=476") cur.execute("UPDATE Channel SET name='TAGM-T-92' WHERE chanid=475") cur.execute("UPDATE Channel SET name='TAGM-T-93' WHERE chanid=474") cur.execute("UPDATE Channel SET name='TAGM-T-94' WHERE chanid=479") cur.execute("UPDATE Channel SET name='TAGM-T-95' WHERE chanid=478") cur.execute("UPDATE Channel SET name='TAGM-T-96' WHERE chanid=477") cur.execute("UPDATE Channel SET name='TAGM-T-97' WHERE chanid=487") cur.execute("UPDATE Channel SET name='TAGM-T-98' WHERE chanid=486") cur.execute("UPDATE Channel SET name='TAGM-T-99' WHERE chanid=485") cur.execute("UPDATE Channel SET name='TAGM-T-100' WHERE chanid=488") #ROWS cur.execute("UPDATE Channel SET name='TAGM-T-9-1' WHERE chanid=375") cur.execute("UPDATE Channel SET name='TAGM-T-9-2' WHERE chanid=376") cur.execute("UPDATE Channel SET name='TAGM-T-9-3' WHERE chanid=377") cur.execute("UPDATE Channel SET name='TAGM-T-9-4' WHERE chanid=378") cur.execute("UPDATE Channel SET name='TAGM-T-9-5' WHERE chanid=379") cur.execute("UPDATE Channel SET name='TAGM-T-27-1' WHERE chanid=398") cur.execute("UPDATE Channel SET name='TAGM-T-27-2' WHERE chanid=399") cur.execute("UPDATE Channel SET name='TAGM-T-27-3' WHERE chanid=400") cur.execute("UPDATE Channel SET name='TAGM-T-27-4' WHERE chanid=401") cur.execute("UPDATE Channel SET name='TAGM-T-27-5' WHERE chanid=402") cur.execute("UPDATE Channel SET name='TAGM-T-81-1' WHERE chanid=457") cur.execute("UPDATE Channel SET name='TAGM-T-81-2' WHERE chanid=458") cur.execute("UPDATE Channel SET name='TAGM-T-81-3' WHERE chanid=459") cur.execute("UPDATE Channel SET name='TAGM-T-81-4' WHERE chanid=460") cur.execute("UPDATE Channel SET name='TAGM-T-81-5' WHERE chanid=461") cur.execute("UPDATE Channel SET name='TAGM-T-99-1' WHERE chanid=480") cur.execute("UPDATE Channel SET name='TAGM-T-99-2' WHERE chanid=481") cur.execute("UPDATE Channel SET name='TAGM-T-99-3' WHERE chanid=482") cur.execute("UPDATE Channel SET name='TAGM-T-99-4' WHERE chanid=483") cur.execute("UPDATE Channel SET name='TAGM-T-99-5' WHERE chanid=484") print 'Done'