I'm using a pysqlite select statement within a def function and it's not
working because (I suspect) the pysqlite variables are not being declared
corrrectly to be used within a def function or the def function is not setup
correctly. Here is the code followed by the errors:
code
co
Guys, I got it to work. The problem was to use pysqlite to search (in memory)
a large number (>10,000) of string items containing the substring q (and to do
it continuosly with different q's). The solution was to incase the substring q
with % ie. '%q%'. The performance is excellent.
The co
I'm trying to copy files from one directory to another based on an input txt
file containing the filename.
Source directory = C:\test
Destination directory = C:\output
input.txt looks like:
12345.pdf
12344.pdf
I having trouble getting my mind around a loop that would accomplish this.
_
Its hard to tell what you're doing wrong without the code.
Sorry, my policy is not to write code for anyone until they have something
to show.
On Sat, Apr 12, 2008 at 11:44 AM, Que Prime <[EMAIL PROTECTED]> wrote:
>
> I'm trying to copy files from one directory to another based on an input
> txt
right ! show us what you've done so far.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
"Que Prime" <[EMAIL PROTECTED]> wrote
> I'm trying to copy files from one directory to another based on an
> input txt
> file containing the filename.
>
> Source directory = C:\test
> Destination directory = C:\output
>
> input.txt looks like:
>
> 12345.pdf
> 12344.pdf
Try writing what you want
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote
Your code has several strangenesses in it but I'll focus on
your query for now...
con = sqlite3.connect(":memory:") # create database/table in
memory
cur = con.cursor()# note: can use the nonstandard execute,
executeman
Say, you have already created a pysqlite database "testDB". In a Python
program, you connect to the database as:
> con = sqlite3.connect("testDB")
> cur = con.cursor()
To use a database in memory (ie. all the 'testDB' tables are held in memory)
the pysqlite documentation says the declaration i
I am trying to make a simple animation, and this is what I have.
from livewires import games, color
games.init(screen_width = 1000, screen_height = 1000, fps = 50)
class Animation(games.Sprite):
files1 = ["stick1.jpg"]
files2 = ["stick2.jpg"]
def __init__(self):
self.animate1()
John Jojo wrote:
I am trying to make a simple animation, and this is what I have.
from livewires import games, color
games.init(screen_width = 1000, screen_height = 1000, fps = 50)
class Animation(games.Sprite):
files1 = ["stick1.jpg"]
files2 = ["stick2.jpg"]
def __init
Dinesh B Vadhia wrote:
Say, you have already created a pysqlite
database "testDB". In a Python program, you connect to the database as:
> con = sqlite3.connect("testDB")
> cur = con.cursor()
To use a database in memory (ie. all the
'testDB' tables are held in memory)
"John Jojo" <[EMAIL PROTECTED]> wrote
> from livewires import games, color
> ...
> def main():
>wall_image = games.load_image("class.jpg", transparent = False)
>games.screen.background = wall_image
>animater = Animation()
>games.screen.add(animater)
>games.screen.mainloop()
>
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote
> Say, you have already created a pysqlite database "testDB".
> In a Python program, you connect to the database as:
> con = sqlite3.connect("testDB")
> cur = con.cursor()
OK so far.
> To use a database in memory (ie. all the 'testDB' tables
> are
On Sat, Feb 9, 2008 at 9:46 AM, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> As I mentioned in an earlier mail it tends to oscillate in practice.
> You start off looking at the problem to identify the basic classes.
> Then you pick one or two and start designing those in detail and
> that identifi
Bob
An in-memory database that is empty to start, loaded with data, and goes away
when the connection goes away is exactly what I'm after. The code and the
program for an in-memory database works perfectly.
However, a web version using webpy doesn't work - the error message is that it
canno
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote
> However, a web version using webpy doesn't work
Now you didn't mention webpy before, that makes a big
difference!
> an execution thread is created by pysqlite and
> another thread by webpy and hence webpy is not
> seeing the table.
Almost ce
16 matches
Mail list logo