Hi all
I have got a problem with the list of strings. I have got the full list of strings, but I can't be able to print for each string which I can only print for the full string.
When I use this:
programList = list()
# set the channels text
for index in range(0, CHANNELS_PER_PAGE):
#get the programs list
cur.execute('SELECT channel, title, start_date, stop_date FROM programs WHERE channel=?', [channel])
programs = cur.fetchall()
for row in programs:
title = row[1].encode('ascii')
if program_width > 1:
programList.append(title)
programTitle = programList
print programTitle
I will get the results like this:
21:17:50 T:5172 NOTICE: ['The Middle - The Ditch', 'The Goonies', 'Pirates of the Caribbean: On Stranger Tides', 'The 700 Club', 'The Fresh Prince of Bel-Air - Day Damn One', 'The Fresh Prince of Bel-Air - Lucky Charm', 'The Fresh Prince of Bel-Air - The Ethnic Tip', 'The Fresh Prince of Bel-Air - The Young and the Restless', 'Summer Sexy With T25!', 'Paid Programming', 'The 700 Club', "Shaun T's Focus T25", 'Sleep Better!', 'Joseph Prince', 'Life Today With James Robison - Christine Caine - FOY, MOR 1', 'Joyce Meyer: Enjoying Everyday Life', 'Amazing Facts Presents', "That '70s Show - Who Wants It More?", "That '70s Show - Fez Gets the Girl", "That '70s Show - Dine and Dash", "That '70s Show - Radio Daze", '700 Club Special Programming', 'Gilmore Girls - A Deep-Fried Korean Thanksgiving', '8 Simple Rules - Princetown Girl', '8 Simple Rules - A Very C.J. Christmas', 'Reba - And the Grammy Goes To ...', 'Reba - The Wall', 'Reba - The Best Defense', 'Reba - For Sale, Cheap', 'Boy Meets World - State of the Unions', 'Boy Meets World - Show Me the Love', 'Boy Meets World - For Love and Apartments', "Boy Meets World - Angela's Men", 'The Middle - The Cheerleader', 'The Middle - The Block Party', 'The Middle - The Floating Anniversary', 'The Middle - The Trip', 'Melissa & Joey - Right Time, Right Place', "Melissa & Joey - Don't Look Back in Anger", 'Melissa & Joey - Accidents Will Happen', 'Baby Daddy - Send in the Clowns', 'Liar Liar', 'The 700 Club', 'Baby Daddy - Flirty Dancing', 'Baby Daddy - Send in the Clowns'
..etc
I want to make the results like this:
21:20:01 T:5796 NOTICE: The Middle - The Ditch
21:20:01 T:5796 NOTICE: The Goonies
21:20:01 T:5796 NOTICE: Pirates of the Caribbean: On Stranger Tides
21:20:01 T:5796 NOTICE: The 700 Club
21:20:01 T:5796 NOTICE: The Fresh Prince of Bel-Air - Day Damn One
21:20:01 T:5796 NOTICE: The Fresh Prince of Bel-Air - Lucky Charm
21:20:01 T:5796 NOTICE: The Fresh Prince of Bel-Air - The Ethnic Tip
21:20:01 T:5796 NOTICE: The Fresh Prince of Bel-Air - The Young and the Restless
21:20:01 T:5796 NOTICE: Summer Sexy With T25!
21:20:01 T:5796 NOTICE: Paid Programming
21:20:01 T:5796 NOTICE: The 700 Club
21:20:01 T:5796 NOTICE: Shaun T's Focus T25
21:20:01 T:5796 NOTICE: Sleep Better!
21:20:01 T:5796 NOTICE: Joseph Prince
21:20:01 T:5796 NOTICE: Life Today With James Robison - Christine Caine - FOY, MOR 1
21:20:01 T:5796 NOTICE: Joyce Meyer: Enjoying Everyday Life
21:20:01 T:5796 NOTICE: Amazing Facts Presents
21:20:01 T:5796 NOTICE: That '70s Show - Who Wants It More?
21:20:01 T:5796 NOTICE: That '70s Show - Fez Gets the Girl
21:20:01 T:5796 NOTICE: That '70s Show - Dine and Dash
21:20:01 T:5796 NOTICE: That '70s Show - Radio Daze
21:20:01 T:5796 NOTICE: 700 Club Special Programming
21:20:01 T:5796 NOTICE: Gilmore Girls - A Deep-Fried Korean Thanksgiving
21:20:01 T:5796 NOTICE: 8 Simple Rules - Princetown Girl
21:20:01 T:5796 NOTICE: 8 Simple Rules - A Very C.J. Christmas
21:20:01 T:5796 NOTICE: Reba - And the Grammy Goes To ...
21:20:01 T:5796 NOTICE: Reba - The Wall
21:20:01 T:5796 NOTICE: Reba - The Best Defense
21:20:01 T:5796 NOTICE: Reba - For Sale, Cheap
21:20:01 T:5796 NOTICE: Boy Meets World - State of the Unions
21:20:01 T:5796 NOTICE: Boy Meets World - Show Me the Love
21:20:01 T:5796 NOTICE: Boy Meets World - For Love and Apartments
21:20:01 T:5796 NOTICE: Boy Meets World - Angela's Men
21:20:01 T:5796 NOTICE: The Middle - The Cheerleader
21:20:01 T:5796 NOTICE: The Middle - The Block Party
21:20:01 T:5796 NOTICE: The Middle - The Floating Anniversary
21:20:01 T:5796 NOTICE: The Middle - The Trip
21:20:01 T:5796 NOTICE: Melissa & Joey - Right Time, Right Place
21:20:01 T:5796 NOTICE: Melissa & Joey - Don't Look Back in Anger
21:20:01 T:5796 NOTICE: Melissa & Joey - Accidents Will Happen
21:20:01 T:5796 NOTICE: Baby Daddy - Send in the Clowns
Do you know how I can print for each string to allow me to make the results that I actually want?