[Tutor] Get variable values
gamito at gmail.com
Thu Feb 1 19:55:31 CET 2007
Danny Yoo wrote:
> Ok, good. Next time, make it more clear to the group that things worked
> out fine, to close the thread. Remember, we can't read your mind: make
> it explicit.
> Otherwise, people will continue to try to help you with something that
> you don't have problems with anymore. *grin*
> 1. "Autocommit" mode is off. That is, by default, your database
> access is transactioned. That means that if you don't commit, the
> database rolls any changes right back out as soon as the connection
> closes. See:
> 2. String literals are really string literals. That is, the code as
> written above will insert the literal string "entry[key].url" as a title.
Yes, i know, i'm a long time PHP programmer.
I was just testing.
> Use prepared statements. See:
> for an example.
Yes, i know too.
> There's also a third thing I'd suggest: abstract our the
> database-creation into a separate function. You're probably going to be
> opening connections in several places in your code: keep the
> connection-open logic in a single place so you can more easily change
> If it's possible, pull out the code that touches the database into a
> separate module layer. People on the list can talk about this more if
> you'd like.
Yes, that will be for later.
For now, i'd just like to pull out the variables values, and i don't
For those who may be interested it's about file __init.py__ from
More information about the Tutor