lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

printing a database error

Wed Dec 23, 2015 11:37 pm

example_db.append("object1", "object2")

print example_db

this cause an error.

why?

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: printing a database error

Thu Dec 24, 2015 1:01 am

OK, I'll bite.

What error do you get when you try to print the database?

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: printing a database error

Thu Dec 24, 2015 2:18 am

invalid syntax.

Make no sense at all.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: printing a database error

Thu Dec 24, 2015 7:34 am

Are you using python 3? If so:

Code: Select all

print(example_db)
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Return to “Python”