SQL Query shows error in program while it function correctly in psql interface
Hi, Following SQL assaignment is not working in Program. intable_bookname=SELECT book_name FROM table_book WHERE book_name='name'; where as this works perfectly fine with psql interface Pls help me on this Thanks a lot in advance Bijoy -- http://mail.python.org/mailman/listinfo/python-list
database connection error - postgresql
Hi,
*code:* (only the class definiton and Database connection part)
import pg
__metaclass__=type
class addbook:
conn=pg.connect('secondbooks.db')
curs=conn.cursor()
*error:*
conn=pg.connect("secondbooks.db")
pg.InternalError: FATAL: database "secondbooks.db" does not exist
In fact i have a database called secondbooks in postgresql.
Pls help on this as i am new to python.
Thanks in advance
Bijoy
--
http://mail.python.org/mailman/listinfo/python-list
Re: SQL Query shows error in program while it function correctly in psql interface
Hi, I have figured this out. Pls excuse me. thanks a lot Bijoy On Mon, Mar 30, 2009 at 12:41 PM, bijoy wrote: > Hi, > > Following SQL assaignment is not working in Program. > > intable_bookname=SELECT book_name FROM table_book WHERE book_name='name'; > > where as this works perfectly fine with psql interface > > Pls help me on this > > Thanks a lot in advance > > Bijoy > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: database connection error - postgresql
hi,
I figured out these too.
Pls excuse me
Thanks
Bijoy
On Mon, Mar 30, 2009 at 1:30 PM, bijoy wrote:
> Hi,
>
> *code:* (only the class definiton and Database connection part)
>
> import pg
>
> __metaclass__=type
>
> class addbook:
>
> conn=pg.connect('secondbooks.db')
> curs=conn.cursor()
>
> *error:*
>
> conn=pg.connect("secondbooks.db")
> pg.InternalError: FATAL: database "secondbooks.db" does not exist
>
>
>
> In fact i have a database called secondbooks in postgresql.
>
> Pls help on this as i am new to python.
>
> Thanks in advance
>
> Bijoy
>
--
http://mail.python.org/mailman/listinfo/python-list
Operational Error. --HELP
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
**infunction_curs.execute('SELECT * FROM table_book')*
it throws up following error.
error:
File "/usr/lib/python2.5/site-packages/pgdb.py", line 197, in executemany
raise OperationalError, "internal error in '%s': %s" % (sql,err)
pg.OperationalError: internal error in 'SELECT * FROM table_book': error
return without exception set
Couldn't figure out the reason. Help needed
Thanks in Advance
Bijoy
--
http://mail.python.org/mailman/listinfo/python-list
Operational Error. --HELP
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
**infunction_curs.execute('SELECT * FROM table_book')*
it throws up following error.
error:
File "/usr/lib/python2.5/site-packages/pgdb.py", line 197, in executemany
raise OperationalError, "internal error in '%s': %s" % (sql,err)
pg.OperationalError: internal error in 'SELECT * FROM table_book': error
return without exception set
Couldn't figure out the reason. Help needed
Thanks in Advance
Bijoy
--
http://mail.python.org/mailman/listinfo/python-list
creating python code with dynamic file name
hi, How can i create python code, for which filename can be defined on the fly..? for example, in a blog, when each article selected, respective python code with headline of the article as filename should be called. thanks bijoy -- http://mail.python.org/mailman/listinfo/python-list
Re: Python simple web development
Hi, I am learning pylons..It seems to be very simple and flexible.. Just give a try if it seems interesting for you Thanks Bijoy On Fri, Jun 26, 2009 at 3:02 AM, Gabriel Genellina wrote: > En Thu, 25 Jun 2009 04:29:28 -0300, Private Private > escribió: > > I am looking for a python library which will allow me to do a simple >> web development. I need to use >> some forms (but nice looking :-) ), creating images based on input >> from those forms, etc. I have read a bit about Django and TurboGears >> but I am afraid that this is too big for my requirements (am I >> wrong ?). >> Can you suggest anything ? >> > > You may try pesto: http://pesto.redgecko.org/ > > pesto is a very small framework (45k to download!), WSGI compliant, > includes session management, mapping URL->function, caching, templates > (optional, whichever you like). Minimalist but flexible. > > Anyway, learning to use Django isn't a bad idea. > > -- > Gabriel Genellina > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
