From x at jwp.name Wed Jun 17 07:42:37 2009 From: x at jwp.name (James William Pye) Date: Tue, 16 Jun 2009 22:42:37 -0700 Subject: [DB-SIG] py-postgresql 0.9 Released: Speed & Query Libraries Message-ID: <0941ABE1-69D4-4BCC-A340-76DA3D3FCCDC@jwp.name> I'm pleased to announce the release of py-postgresql 0.9.0 and 0.8.2. py-postgresql is a Python programmer's client (driver) for PostgreSQL and general toolkit for working with PostgreSQL in Python. http://python.projects.postgresql.org/?utm_source=release&utm_medium=email&utm_campaign=py-postgresql-0.9.0 Changes in 0.9: * Performance Improvements. Always nice. =) * Query Libraries--statement management. * Display of line and relative location of the POSITION for syntax errors. * DB-API now extends PG-API. * Many under-the-hood improvements. Special thanks to the following bug reporters: Mike Bayer [Broken DB-API row counts] Dallas Morisett [Broken procedure reference generation] ... Bugs, while of crunchy consistency, are fearlessly squashed. ... If you find a bug, a report would be greatly appreciated. http://pgfoundry.org/tracker/?atid=442&group_id=1000094 From michele.petrazzo at unipex.it Wed Jun 17 08:51:47 2009 From: michele.petrazzo at unipex.it (Michele Petrazzo - Unipex) Date: Wed, 17 Jun 2009 08:51:47 +0200 Subject: [DB-SIG] py-postgresql 0.9 Released: Speed & Query Libraries In-Reply-To: <0941ABE1-69D4-4BCC-A340-76DA3D3FCCDC@jwp.name> References: <0941ABE1-69D4-4BCC-A340-76DA3D3FCCDC@jwp.name> Message-ID: <4A389283.6070702@unipex.it> James William Pye wrote: > I'm pleased to announce the release of py-postgresql 0.9.0 and 0.8.2. > > > > First of all, thanks for the module. Two questions: - I look around, but I don't find a reply to the question if you want to "backport" the py-postgresql to the python 2.X line. Have us some hope to use it in our "old" projects? - Making some tests with a test db, I see that, like the other python-pg drivers, the cur.execute("select * from table"), load all the data in memory. Can be useful, if possible of course, to not use this lot of ram? With psycopg2 devels can use the "named cursor" for solve. Any chances to add this type of feature? Thanks, Michele From lists at jwp.name Wed Jun 17 21:30:15 2009 From: lists at jwp.name (James Pye) Date: Wed, 17 Jun 2009 12:30:15 -0700 Subject: [DB-SIG] py-postgresql 0.9 Released: Speed & Query Libraries In-Reply-To: <4A389283.6070702@unipex.it> References: <0941ABE1-69D4-4BCC-A340-76DA3D3FCCDC@jwp.name> <4A389283.6070702@unipex.it> Message-ID: <4ADACB74-C5A7-4D21-9431-B7BAB7A9DED8@jwp.name> On Jun 16, 2009, at 11:51 PM, Michele Petrazzo - Unipex wrote: > First of all, thanks for the module. > > Two questions: > - I look around, but I don't find a reply to the question if you > want to > "backport" the py-postgresql to the python 2.X line. Have us some hope > to use it in our "old" projects? Well, there is pg_proboscis that py-postgresql was based on. It is quite lacking by comparison, but functional. But no, I don't plan to backport it. > - Making some tests with a test db, I see that, like the other > python-pg > drivers, the cur.execute("select * from table"), load all the data in > memory. Can be useful, if possible of course, to not use this lot of > ram? With psycopg2 devels can use the "named cursor" for solve. Any > chances to add this type of feature? It shouldn't be loading it all into memory by default... If it is, it's a bug. However, It should be grabbing some pretty big chunks when it needs more data to supply a fetchXXX request, so if you're looking at a wide result set, that could use a large amount of memory. From mikebader9 at gmail.com Thu Jun 25 22:54:28 2009 From: mikebader9 at gmail.com (Mike Bader) Date: Thu, 25 Jun 2009 16:54:28 -0400 Subject: [DB-SIG] SQLite Problem Message-ID: Hello, I am relatively new to both SQLite and Python. I am trying to write a script that calls data from a database and prints it to a website. The problem is, when I try to do this, as soon as I try to do something with cursor.execute("SQL cmd"), the webpage stops printing at that spot and does not continue. When I run it in from the shell, however, the program prints as it should. My script is: import cgi import sqlite3 as sql def defineContentType(): print "Content-type:text/html\n" defineContentType() print """ test page This is before
""" conn = sql.connect("data_temp") cur = conn.cursor() cur.execute('''SELECT type FROM sqlite_master WHERE tbl_name="data"''') if len(cur.fetchall())>0: cur.execute('''DROP TABLE data''') conn.commit() cur.execute('''CREATE TABLE data ( id INTEGER PRIMARY KEY AUTOINCREMENT, strfield varchar(8), numfld1 FLOAT NOT NULL, numfld2 FLOAT NOT NULL)''') conn.commit() cur.execute('''INSERT INTO data (strfield, numfld1, numfld2) VALUES ("%s",%f,%f)''' % ("testing123",40.8052, -73.9654)) conn.commit() cur.execute('''SELECT * FROM data''') print cur.fetchall() conn.close() print """This is after """ When I call it from a browser, this is what I get: test page This is before
But when I run the file from the shell, I get: Content-type:text/html test page This is before
[(1, u'testing123', 40.805199999999999, -73.965400000000002)] This is after Can anyone please help me understand why the program might stop printing when retrieved through a browser and run fine when run in the shell? Could it be related to the version of SQLite I am using (and if so, how do I check?) Thank you very much. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From kylev at kylev.com Thu Jun 25 23:19:40 2009 From: kylev at kylev.com (Kyle VanderBeek) Date: Thu, 25 Jun 2009 14:19:40 -0700 Subject: [DB-SIG] SQLite Problem In-Reply-To: References: Message-ID: > conn = sql.connect("data_temp") You're going to want to be more explicit here. The current working directory may not be the same when running under a web server, so specify a full path to the DB file. Also, ensure that the user the web server is running as has appropriate permissions to said file. -- kylev at kylev.com Some people have a way with words, while others... erm... thingy. From info at egenix.com Mon Jun 29 11:07:37 2009 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Mon, 29 Jun 2009 11:07:37 +0200 Subject: [DB-SIG] ANN: eGenix mxODBC Connect 1.0.2 - Python Database Interface Message-ID: <4A488459.3030601@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mxODBC Connect Python Database Interface Version 1.0.2 Our new client-server product for connecting Python applications to relational databases - from all major platforms This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-Connect-1.0.2-GA.html ________________________________________________________________________ INTRODUCTION The mxODBC Connect Database Interface for Python allows users to easily connect Python applications to all major databases on the market today in a highly portable and convenient way. Unlike our mxODBC Python extension, mxODBC Connect is designed as client-server application, so you no longer need to find production quality ODBC drivers for all the platforms you target with your Python application. Instead you use an easy to install Python client library which connects directly to the mxODBC Connect database server over the network. This makes mxODBC Connect the ideal basis for writing cross-platform database programs and utilities in Python, especially if you run applications that need to communicate with databases such as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix, Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more, that run on Windows or Linux machines. By removing the need to install and configure ODBC drivers on the client side, mxODBC Connect greatly simplifies setup and configuration of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure. For more information, please see the product page: http://www.egenix.com/products/python/mxODBCConnect/ ________________________________________________________________________ NEWS mxODBC Connect 1.0.2 is a patch-level release of our new mxODBC Connect product. * More Secure We have upgraded the server to our latest eGenix pyOpenSSL release 0.9.0-0.9.8k, which includes a number of important bug fixes to both pyOpenSSL and the used OpenSSL library. * More Robust Previous versions had a timeout issue that we have solved with this release. We have have also added a special case for shutting down the client with a broken server connection. In such cases, the client will no longer wait for a timeout and terminate much faster. * Ideal for Building Bridges mxODBC Connect Client now works on all major Python platforms. As a result, connecting from e.g. Linux or Mac OS X to an SQL Server database has never been easier. You can even keep the data sources you already have configured on your Windows machine and connect to them as if your application were running on the database server itself. ________________________________________________________________________ UPGRADING You are encouraged to upgrade to this latest mxODBC Connect release. When upgrading, please always upgrade both the server and the client installations to the same version - even for patch level releases. Customers who have purchased mxODBC Connect 1.0 licenses can download and upgrade their existing installations without having to purchase new licenses or upgrades. The licenses will continue to work with version 1.0.2. Users of our stand-alone mxODBC product will have to purchase new licenses from our online shop in order to use mxODBC Connect. You can request 30-day evaluation licenses by visiting our web-site or writing to sales at egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need. http://www.egenix.com/products/python/mxODBCConnect/#Evaluation ________________________________________________________________________ DOWNLOADS The download archives as well as instructions for installation and configuration of the product can be found on the product page: http://www.egenix.com/products/python/mxODBCConnect/ If you want to try the package, jump straight to the download instructions: https://cms.egenix.com/products/python/mxODBCConnect/#Download Fully functional evaluation licenses for the mxODBC Connect Server are available free of charge: http://www.egenix.com/products/python/mxODBCConnect/#Evaluation mxODBC Connect Client is always free of charge. _______________________________________________________________________ SUPPORT Commercial support for this product is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 29 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From n.lazzaro at hotmail.it Mon Jun 29 13:03:03 2009 From: n.lazzaro at hotmail.it (=?iso-8859-1?Q?Nicol=F2_Lazzaro?=) Date: Mon, 29 Jun 2009 13:03:03 +0200 Subject: [DB-SIG] Managing Large/Huge Data Base + First Steps Message-ID: Hi all! I'm trying to build a program that works in some way like a "life evolution simulator". This "planet" should be made of - at least - 10^8 cells, that continuously change their state and are subject to mathematical functions. I've just came to python, after realizing that PHP and SQL (of what I know some basic scripting) could never fit this project, thinking of moving from databases to text files. So I've come to this mailing list, hoping to learn something useful for my purpose and willing to know were should I look (after some beginner tutorial of course) to get the right skills in this specific field. Thank you for reading! I hope to find some answer, have a nice day! :-D Nicolo' _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Mon Jun 29 18:32:45 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Mon, 29 Jun 2009 10:32:45 -0600 Subject: [DB-SIG] Managing Large/Huge Data Base + First Steps In-Reply-To: References: Message-ID: Nicol?: You are correct -- this is a project for Python, not PHP. However, I suspect that a text file will not help you. Perhaps a large random access data file (which is what an SQL database uses internally) would be an appropriate answer. Projects such as you describe take either a lot of time, or a lot of money. An SQL database (with a large enough storage array under it) could be built to hold 10^8 items, but access speed may be a problem if the contents change frequently. Otherwise you may need a computer (or an array of computers) with a LOT of virtual memory. Fast memory is expensive. If you can wait weeks for your results, you can build your "planet" on disk for not much money. If you need results in minutes, you will need to purchase time on a supercomputer. Your budget will be the deciding factor. How much data does each "cell" hold? How often do they change state? -- Vernon Cole (Perhaps you should answer me directly -- this group is ususally used only for low-bandwidth announcements and such. If anyone else wants to jump in they may, of course. -- VC) 2009/6/29 Nicol? Lazzaro > Hi all! I'm trying to build a program that works in some way like a "life > evolution simulator". This "planet" should be made of - at least - 10^8 > cells, that continuously change their state and are subject to mathematical > functions. I've just came to python, after realizing that PHP and SQL (of > what I know some basic scripting) could never fit this project, thinking of > moving from databases to text files. > So I've come to this mailing list, hoping to learn something useful for my > purpose and willing to know were should I look (after some beginner tutorial > of course) to get the right skills in this specific field. > > Thank you for reading! I hope to find some answer, have a nice day! :-D > Nicolo' > ------------------------------ > Invite your mail contacts to join your friends list with Windows Live > Spaces. It's easy! Try it! > > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: