learning django 3.5 hrs

by Brian Sy on April 13, 2014

PyCon Django

{ Comments on this entry are closed }

Really need to learn git, what is git!

by Brian Sy on April 10, 2014

Really need to learn git, what is git!
random stuff

{ Comments on this entry are closed }

Self pace videos, about 2 hrs long

Learn Django

{ Comments on this entry are closed }

python tutorials – list

by Brian Sy on February 19, 2014

#list are between [] in python, they are mutable. its like an array

a = ['tom', 'matt', 'brian', 'mike', 'sy', 'adam']

#type(a) #will check if a list

print a #will return ['tom', 'matt', 'brian', 'mike', 'sy', 'adam']

#print a list, one line at a time

for i in a:
print i

 

{ Comments on this entry are closed }

#this will show you how to retrieve all the data from all rows and column in sqlite database

import sqlite3

#will connect and create a new database if dont already exist call databasename.db
connect_to_database = sqlite3.connect(‘databasename.db’)

# but we can make sqlite3 always return bytestrings
connect_to_database.text_factory = str

cur = connect_to_database.cursor()

readrows = cur.execute(“SELECT * FROM eng”)
readrows = readrows.fetchall()

for i in readrows:
print i

{ Comments on this entry are closed }

eXTReMe Tracker