#!/usr/bin/env python import sqlite3 conn = sqlite3.connect("/var/lib/lliurex-sync-server/userlogged") c = conn.cursor() c.execute('select * from users') for row in c: print (str(row[1])+" "+ str(row[0])+" "+str(row[2])) c.close()