Here is what I use in my scripts to access DAL from a regular Python script using MySQL database:

import sys
sys.path.append('path_to_web2py')
from gluon import DAL
db = DAL('mysql://username:password@servername/databasename',folder='path_to_the_databases_folder_of_my_application', auto_import=True)

    -Jim

On 11/29/2011 3:28 AM, chandrakant kumar wrote:
how can i do from gluon.sql import *, in a normal python shell.

Reply via email to