python - sorting with conditions
===

Im have various rows on csv, but i just want to sort those who are higher than 0, since i also have negative numbers, so i tried this, and it doesn't seem to work

    try :
        ligacsv = csv.reader(open('%s/liga.csv', 'r')%BASE_DIR, delimiter='|')
    
    except IOError, e

    try:
        ligacsv = csv.reader(open('C:/www/liga.csv', 'r'), delimiter='|')
    except: ligacsv=[]


    d = sorted(ligacsv, key=lambda x: (int(x[23])>'0'), reverse=False)
    
    for linha in d:
        for i in linha[23:24]:
            print '<td align="right">%s</td>' %i

im outputing in html

Can you guys help me?