Hi,
I have a SQLite cursor which I want to traverse more than once, eg...
for row in MyCursor:
method1(row)
then later...
for row in MyCursor:
method2(row)
Method2 is never run, I guess because the pointer is at the bottom of
the row 'stack' after the first 'for' loop
How can I mo
Kent Johnson wrote:
On Thu, Feb 4, 2010 at 12:47 PM, Alan Harris-Reid
wrote:
Hi,
I have a SQLite cursor which I want to traverse more than once, eg...
for row in MyCursor:
method1(row)
then later...
for row in MyCursor:
method2(row)
Method2 is never run, I guess because the pointer
ethod
do something else here
When the super().__init__ line runs I get the error "__init__() takes
exactly 1 positional argument (2 given)"
Can anyone tell me where I have gone wrong? I thought the self
parameter should be passed to all class methods.
TIA
A
Kent Johnson wrote:
On Sat, Feb 20, 2010 at 12:50 PM, Alan Harris-Reid
wrote:
Hi,
I am having trouble understanding how superclass calls work. Here's some
code...
class ParentClass():
def __init__(self):
do something here
You should inherit object to use super():
Luke Paireepinart wrote:
Your call to super is wrong. It should be super and you pass the class
and instance, then call init.
On 2/20/10, Alan Harris-Reid wrote:
Hi,
I am having trouble understanding how superclass calls work. Here's
some code...
class ParentClass():
def __i
Hi,
I am having trouble understanding how superclass calls work. Here's
some code...
What version of Python are you using?
In Python 2.x, you MUST inherit from object to use super, and you MUST
explicitly pass the class and self:
class ParentClass(object):
def __init__(self, a,
are error codes, but it
looks like the sqlite3 module is not reporting them.
Has anyone any ideas how to get around this problem?
TIA,
Alan Harris-Reid
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://ma
Benno Lang wrote:
On 10 March 2010 11:37, Alan Harris-Reid wrote:
Hi there,
I am using the sqlite3 module with Python 3.1, and have some code which goes
something like as follows...
import sqlite3
con = sqlite3.connect('MyDatabase.db')
try:
execresult = con.execute('INSE
Sander Sweers wrote:
- Original message -
I am using the sqlite3 module with Python 3.1, and have some code which
goes something like as follows...
import sqlite3
con = sqlite3.connect('MyDatabase.db')
try:
execresult = con.execute('INSERT INTO MyTable (field_name) VALUES
("
Hi Siva,
I can run the .py file from the DOS command line without any problem
under WinXP. Can you give some more information regarding your error
message?
Regards,
Alan Harris-Reid
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
ot directory,
in which case you need the following in your configuration file.
[/]
tools.staticdir.root = '/path/to/root/folder' # no trailing backslash
tools.staticdir.on = True
tools.staticdir.dir = "" # necessary
to serve static files in
11 matches
Mail list logo