Re: question about deleting records from mysql
[EMAIL PROTECTED] wrote: > ok. did this > > >>>>cursor.execute("DELETE FROM table WHERE autoinc > 1000") > > 245L > >>>>cursor.commit() > > > i got an AttributeError 'Cursor' object has no attribute 'commit' > > hmm. what should i do now? > the stuff about writing a lightweight layer between the dbapi and the > program shot right over my head. sorry, but thanks > IIRC it is the connection that can commit(), not the cursor. Rowdy -- http://mail.python.org/mailman/listinfo/python-list
Re: MySQLdb UPDATE does nothing
John Moore wrote: > Hi, > > I normally work with Java but I'm interested in using Python as well, > particularly for little tasks like doing some massaging of data in a > MySQL database. Below is my first attempt. I'm sure it's inelegantly > written, but my main concern is that the UPDATE sql doesn't actually > work, and I can't understand why. No error is returned, it's just that > the update does not take place. The SQL itself is fine, though - if I > instead write the SQL to a file I can use it from the mysql command line > and it does all the updates just fine. What have I missed? > > John > A similar question was asked back in July, someone posted this: If it's any help, using cursor.execute("set autocommit = 1") before doing anything else works nicely unless you actually need transactions. Rowdy -- http://mail.python.org/mailman/listinfo/python-list
Re: Max files in unix folder from PIL process
David Pratt wrote: Hi. I am creating a python application that uses PIL to generate thumbnails and sized images. It is beginning to look the volume of images will be large. This has got me to thinking. Is there a number that Unix can handle in a single directory. I am using FreeBSD4.x at the moment. I am thinking the number could be as high 500,000 images in a single directory but more likely in the range of 6,000 to 30,000 for most. I did not want to store these in Postgres. Should this pose a problem on the filesystem? I realize less a python issue really but I though some one might have an idea on the list. Regards, David. FreeDB (CD database) stores one file per CD in one directory per category. The "misc" category/directory on my FreeBSD 5.3 system currently contains around 481,571 small files. The "rock" directory/category contains 449,208 files. As some have said, ls is *very* slow on these directories, but otherwise there don't seem to be any problems. Rowdy -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Debugger / IDE ??
Don Taylor wrote: > Is there a free or low-cost version of Delphi for Windows available > anywhere? > There used to be a Delphi 6 Personal Edition that was available free (for non-commercial use). You might still find it around somewhere. Rowdy -- http://mail.python.org/mailman/listinfo/python-list