Re: Setting the encoding in pysqlite2

2005-08-26 Thread Gerhard Haering
On Thu, Aug 25, 2005 at 01:15:55AM -0700, Michele Simionato wrote: An easy question, but I don't find the answer in the docs :-( I have a sqlite3 database containing accented characters (latin-1). How do I set the right encoding? For instance if I do this: [...] You cannot set the encoding

Re: dictionary as property

2005-07-19 Thread Gerhard Haering
On Tue, Jul 19, 2005 at 07:56:20PM +0300, Thanos Tsouanas wrote: Hello. (How) can I have a class property d, such that d['foo'] = 'bar' will run a certain function of the class with 'foo' and 'bar' as it's arguments? You could implement a custom container type that will do what you want. See

Re: What is your favorite Python web framework?

2005-07-18 Thread Gerhard Haering
On Mon, Jul 18, 2005 at 09:06:21AM -0400, Peter Hansen wrote: JZ wrote: I think Django is more mature than Subway or CherryPy and can quickly become the black horse in area of pythonic frameworks. I'm not familiar with this expression. What do you mean by black horse? Maybe the Ferrari

Re: goto

2005-07-18 Thread Gerhard Haering
On Mon, Jul 18, 2005 at 08:40:16AM -0700, Kay Schluehr wrote: Hayri ERDENER schrieb: hi, what is the equivalent of C languages' goto statement in python? best regards No, but some of goto's use cases can be covered by unconditional jumps provided by exceptions. [...] I like the named

Re: psycopg simplest problem

2005-07-08 Thread Gerhard Haering
On Fri, Jul 08, 2005 at 04:23:50PM +0200, Glauco wrote: [...] My problem is to do a middle layer over pycopg for eliminate type casting problem in postgres in all direction. i've resolved this doing a C extension in python and manipulating only string and int in my application. this is

Re: VC++ linking problem

2005-07-07 Thread Gerhard Haering
On Thu, Jul 07, 2005 at 04:52:11AM -0700, J wrote: Hi everyone, I started embedding python into a 3D graphics App and I came across this linking problem. SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol __imp__Py_InitModule4TraceRefs SO.lib(ScnNode.obj) : error

[ANN] pysqlite 2.0.3 released

2005-05-28 Thread Gerhard Haering
This is a minor bugfix release. Wiki, bugtracker, downloads at http://pysqlite.org/ Changes since 2.0.2 === The changes for prefetching in 2.0.2 were incomplete. A check that made sense before had to be removed, otherwise fetchone() / fetchmany() / fetchall() could raise

Re: write to the same file from multiple processes at the same time?

2005-05-27 Thread Gerhard Haering
On Fri, May 27, 2005 at 09:27:38AM -0400, Roy Smith wrote: Peter Hansen [EMAIL PROTECTED] wrote: The OP was probably on the right track when he suggested that things like SQLite (conveniently wrapped with PySQLite) had already solved this problem. Perhaps, but a relational database

Re: SQL Query via python

2005-05-23 Thread Gerhard Haering
On Mon, May 23, 2005 at 04:12:31PM +, Austyn Bontrager wrote: How about: cursor.execute( SELECT name, month, day ,category, city FROM bday WHERE %(col_name)s = %%s % dict(col_name=arg1), (arg2) ) The %(col_name)s will be replaced by normal Python

Re: [pysqlite] How do I use pysqlite in a multi-threading env.?

2005-05-20 Thread Gerhard Haering
On Fri, May 20, 2005 at 08:42:54AM +0200, F. GEIGER wrote: In my wxPython-app a part of it gathers data, when a button is pressed, and stores it into a db. The GUI part should display the stuff being stored in the db. When both parts work on the same connection, I get SQL statements in

[ANN] pysqlite 2.0.2 released

2005-05-20 Thread Gerhard Haering
This is a minor bugfix release. Wiki, bugtracker, downloads at http://pysqlite.org/ If you missed 2.0.1, it fixed a bug that could happen if user-defined functions/aggregates were getting out of scope. It's a fatal bug that will crash your application if you encounter it. - Code changes to

Re: [pysqlite] pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress

2005-05-19 Thread Gerhard Haering
On Wed, May 18, 2005 at 09:41:39PM +0200, F. GEIGER wrote: I've troubles to let my app take off using pysqlite. What I wonder most for now is that pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress when I do this: Urgh! I would have preferred

[ANN] pysqlite 2.0.0 final released!

2005-05-16 Thread Gerhard Haering
Hello everyone, After pondering about a redesign of pysqlite for years, and now after half a year of development, I am happy to finally announce the first stable release of pysqlite2. pysqlite a DB-API 2.0-compliant database interface for SQLite. SQLite is a relational database management

Re: sync dir's

2005-05-10 Thread Gerhard Haering
On Tue, May 10, 2005 at 05:21:30PM +1000, Timothy Smith wrote: i need something which has a python library, so far i haven't seen anything like that for rsync. i'll check out the others but http://osx.freshmeat.net/projects/pysync/ Pysync has both a demonstration implementation of

[ANN] pysqlite 2.0.beta1

2005-05-07 Thread Gerhard Haering
== pysqlite 2.0.beta1 == I'm glad to announce pysqlite 2.0.beta1. The API is 98 % stable now. And pysqlite itself should be a lot more stable too, now. The most notable changes are a lot of fixed refcount bugs, and the added documentation. Download the release

[ANN] pysqlite 2.0.alpha3

2005-04-23 Thread Gerhard Haering
=== pysqlite 2.0.alpha3 === I'm glad to announce pysqlite 2.0.alpha3, which will be the last alpha release. Documentation and more testing will be what I'm concentrating on in the beta test phase, so here's the explanation of the new features within the change

[ANN] pysqlite 2.0.alpha3

2005-04-21 Thread Gerhard Haering
=== pysqlite 2.0.alpha3 === I'm glad to announce pysqlite 2.0.alpha3, which will be the last alpha release. Documentation and more testing will be what I'm concentrating on in the beta test phase, so here's the explanation of the new features within the change

Re: [ANN] pysqlite 2.0.alpha3

2005-04-21 Thread Gerhard Haering
On Fri, Apr 22, 2005 at 01:34:32AM +0200, Gerhard Haering wrote: === pysqlite 2.0.alpha3 === I'm glad to announce pysqlite 2.0.alpha3, which will be the last alpha release. Documentation and more testing will be what I'm concentrating on in the beta test

Re: DBAPI Paramstyle

2005-03-28 Thread Gerhard Haering
On Mon, Mar 28, 2005 at 01:43:28PM -0800, Andy Dustman wrote: Tim Roberts wrote: [prepared statements] mx.ODBC does, since it is an ODBC implementation. I would be very surprised if the Oracle adapter did not. MySQLdb does not yet, but probably will by the end of summer (with MySQL-4.1 or

Re: fastest postgresql module

2005-03-17 Thread Gerhard Haering
On Fri, Mar 18, 2005 at 09:31:45AM +1000, Timothy Smith wrote: Leif B. Kristensen wrote: Timothy Smith skrev: has anyone got some hard numbers on which pg access module is the fastest, i currently use pypgsql, but i can't help but feel it's a little slow. 3 seconds to connect, send one

[ANN] pysqlite 2.0.alpha2

2005-03-13 Thread Gerhard Haering
pysqlite 2.0.alpha2 === The last release was back in Nov. 2004, but pysqlite 2 development is going on faster now. So it's time for another alpha release to collect feedback. Please report any bugs you find on the pysqlite mailing list, or even better on the trac tracking system

Re: User Identification

2005-02-08 Thread Gerhard Haering
On Tue, Feb 08, 2005 at 12:29:48PM -, Bob Parnes wrote: I have a python program on a server of an all-linux network. It needs to record the user name running it. Is there a way for the program to extract the name from the system without a separate log-in dialog? os.environ[USER] for a

Re: Python 2.4 binaries for accessing PostgreSQL from Windows?

2005-02-04 Thread Gerhard Haering
On Fri, Feb 04, 2005 at 02:24:50AM -0800, Frank Millman wrote: Hi all The subject line says it all. I have been using pypgsql to access PostgreSQL from Linux and from Windows, and it works fine. I am upgrading to Python 2.4. I can recompile pypgsql for Linux, but I do not have a

Re: Debian says Warning! you are running an untested version of Python. on 2.3

2005-01-13 Thread Gerhard Haering
On Thu, Jan 13, 2005 at 12:56:38PM -, Alex Stapleton wrote: Whenever I run python I get Warning! you are running an untested version of Python. prepended to the start of any output on stdout. [...] ROFL. Are you using testing, sid or experimental? I expect overzealous patching from

Re: Python.org, Website of Satan

2005-01-12 Thread Gerhard Haering
On Wed, Jan 12, 2005 at 10:15:34AM -0500, Jane wrote: [...] Some people have too much time on their hands... OMG, PyPy is full of evil, too!!!1 print sum([ord(x) for x in PyPy]) or, if you haven't upgraded to 2.4, yet: import operator print reduce(operator.add, [ord(x) for x in

Re: Embedding a restricted python interpreter

2005-01-06 Thread Gerhard Haering
On Thu, Jan 06, 2005 at 07:32:25AM -0800, Paul Rubin wrote: Jp Calderone [EMAIL PROTECTED] writes: A Python sandbox would be useful, but the hosting provider's excuse for not allowing you to use mod_python is completely bogus. All the necessary security tools for that situation are

Re: DB-API 2.0 in pysqlite and pgdb

2005-01-04 Thread Gerhard Haering
On Sat, Jan 01, 2005 at 06:33:24PM +0300, Roman Suzi wrote: Happy New Year to all Pythoneers! I am playing with pysqlite and pgdb and their DB-API conformancy. It was quite interesting to know: - sqlite doesn't have mandatory helper-functions Date, Tim, etc. (due to an error int

[OT] Azureus Java BitTorrent client - was: Re: Probleme mit der Installation der openSource Bittorrent.... python vs JAVA

2004-12-30 Thread Gerhard Haering
On Thu, Dec 30, 2004 at 07:24:45AM -0800, xunling wrote: Hallo, ich hätte da mal eine Frage zum Azureus bttrn client. [...] [I'd have a question about the Azureus BitTorrent client.] While the original BitTorrent is implemented in Python, this is not the right mailing list/newsgruop for Java

Re: Probleme mit der Installation der openSource Bittorrent.... python vs JAVA

2004-12-30 Thread Gerhard Haering
On Fri, Dec 31, 2004 at 12:02:24AM +0800, Craig Ringer wrote: On Thu, 2004-12-30 at 23:31, JZ wrote: Dnia 30 Dec 2004 07:24:45 -0800, xunling napisa??(a): ich hätte da mal eine Frage zum Azureus bttrn client. This is not German newsgroup! Write English or none. While that may be

Re: Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Gerhard Haering
Of not so much interest to most Pythoneers, but ... I cross-posted this to python-list to make people aware that thare are *real* problems with mingw + Python 2.4, not only theoretical ones. -- Gerhard signature.asc Description: Digital signature --

Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Gerhard Haering
Hello, I used to build Python extension modules with mingw. Now, Python has switched to the MSVCR71 runtime with version 2.4, and I thought mingw has support for this. But I get problems with symbols being referenced from the wrong DLLs. You can see the problem by compiling this:

Re: problem with datetime

2004-12-10 Thread Gerhard Haering
On Fri, Dec 10, 2004 at 04:19:56AM -0800, [EMAIL PROTECTED] wrote: Relatively new to python. I can get the following to work from the command line: Python 2.3.4 (#2, Aug 18 2004, 21:49:15) [GCC 3.2] on linux2 Type help, copyright, credits or license for more information. import datetime

Re: PySQLLite Speed

2004-12-03 Thread Gerhard Haering
On Thu, Dec 02, 2004 at 04:22:25PM -0800, Kevin wrote: Hello All, I wondering if anyone has encountered the same issue with using PySQL. This is my first time using this DB so this preformance may be typical. I'm reading an ASCII file through PyParse that contains about 1.3Meg of Float

Re: PySQLLite Speed

2004-12-03 Thread Gerhard Haering
On Thu, Dec 02, 2004 at 08:39:31PM -0800, Kevin wrote: Hello All, I wanted to thank Roger Binn for his email. He had the answer to my issue with writing speed. It's actual made an incredible change in the preformace. I didn't have to go all the way to implementing the synchronous

Re: PySQLLite Speed

2004-12-03 Thread Gerhard Haering
On Fri, Dec 03, 2004 at 06:06:11AM -0500, Kent Johnson wrote: If your data is (or can be) created by an iterator, you can use this recipe to group the data into batches of whatever size you choose and write the individual batches to the db.

Re: 2.4 or 2.3.4 for 2.3 software?

2004-12-01 Thread Gerhard Haering
On Wed, Dec 01, 2004 at 10:23:55AM +0100, Jens Bloch Helmers wrote: Can we expect the current release of 2.4 to be just as reliable as 2.3.4 for 2.3 compliant software? Only time will tell. I myself had never had any problems with 2.x.0 versions of Python. Only early 2.0.x had a few problems