Questions tagged [pysqlite]

A DB-API2 compliant module in Python for interacting with a SQLite relational database.

140 questions
0
votes
3 answers

Decorator isn't passing arguments?

I've been working on serialising a n-dimensional array into a 1-dimensional "array" database: from collections import Iterable, Mapping import sqlite3 def pass_many(vals, some_funct, args=()): if not vals: return if isinstance(vals,…
user1438003
  • 6,603
  • 8
  • 30
  • 36
0
votes
4 answers

Passing a member function as a function arg?

I've written a very simple select function for SQLite, but I'm confused at how to pass a member function... e.g.: .fetchone(), .fetchmany(). def select(cursor, select="*", table="reuters", fetch=".fetchone()", tologfile=False, logfile=""): if…
user1438003
  • 6,603
  • 8
  • 30
  • 36
0
votes
1 answer

pysqlite and python : wont insert data into table but code executes fine

I am trying to insert some data into a pysqlite database but even tho the code runs fine with no errors nothing shows up in the database and i have made sure that the variable does contain a value cur = self.con.execute("insert into urllist(url)…
Dan
  • 27
  • 1
  • 7
-1
votes
1 answer

Using a "with" contextmanager with pysqlite

I'm trying to use the "with" contextmanager using pysqlite: >>> with conn.cursor() as db: res = db.execute("SELECT * FROM Publishers LIMIT 5;").fetchall() ... ... Traceback (most recent call last): File "", line 1, in…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
-7
votes
1 answer

Any other way to write this statement

I'm trying to write this statement in some other way. True if 'sessionid' in request.cookies else False Please help me with this.
Sanjay Tarani
  • 21
  • 1
  • 5
1 2 3
9
10