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

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

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 "PyP

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 f

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

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

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. > >

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

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 t

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.

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 d

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

[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 a

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 connec

Re: Psycopg2 mirror availability

2004-11-29 Thread Gerhard Haering
On Sun, Nov 28, 2004 at 10:06:20PM +, Andrew James wrote: > Gerhard, > What's your public key? Your messages are all showing up as having an > invalid signature! The key should be on the keyservers now. -- Gerhard signature.asc Description: Digital signature -- http://mail.python.org/mailm

Re: Building web graphics with Python

2004-11-29 Thread Gerhard Haering
On Mon, Nov 29, 2004 at 10:35:00AM +0100, Peter Maas wrote: > Steven Feil schrieb: > >I am wondering if there is a light weight Python library for producing > >web graphics on-the-fly. There is a C-language library called gd that > >can be used in a CGI program to produce gif images. The Library c

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

Re: exec size

2004-12-02 Thread Gerhard Haering
On Fri, Dec 03, 2004 at 10:14:48PM +0530, km wrote: > Hi all, > just curious to know why /usr/bin/python2.3 is 890K and > /usr/bin/python2.4 is 3.5M in linux ? Did you try already removing the debug symbols with strip(1)? -- Gerhard signature.asc Description: Digital signature -- http://mai

Re: exec size

2004-12-02 Thread Gerhard Haering
On Fri, Dec 03, 2004 at 10:53:30PM +0530, km wrote: > Hi Gerhard, > ya have tried stripping python2.4 it came to 952K. now does the size > diference before and after strip affect the runtime of a python program ? No, it only saves some space on disk. The interpreter doesn't need any less memory

Re: installer

2004-12-02 Thread Gerhard Haering
On Sat, Dec 04, 2004 at 12:15:04AM +0530, km wrote: > Hi all, > > does python have a default module installer inbuilt as for perl in > windows ? No, there is no CPAN-like system for Python. You will have to search, download and install your third-party Python libraries yourself. OTOH, there are

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 F

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. > http://aspn.activestate.com/ASPN/Cookbook/Python

Re: I need to create the table and I want to edit its content from www level.

2004-12-08 Thread Gerhard Haering
On Wed, Dec 08, 2004 at 09:03:54AM -0800, Rootshell wrote: > Hello. > > I have one more problem with 'tabla.py' file: We don't know about the files on your harddisk ;-) > Can't do the compilation 'cause something wrong is happening with > module 'posix'. Whoever wrote tabla.py probably didn't

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. > >>>

Re: why not arrays?

2004-12-16 Thread Gerhard Haering
On Thu, Dec 16, 2004 at 05:51:18AM -0800, Rahul wrote: > Hi. > I just wanted to know why arrays have not been included as a builtin > datatype like lists or dictionaries? The numpy extension shows that it > can be implemented. then why not include arrays in core python? Arrays are included in a mo

Re: BASIC vs Python

2004-12-17 Thread Gerhard Haering
On Fri, Dec 17, 2004 at 11:49:22AM +0100, Peter Otten wrote: > Peter Hickman wrote: > > [..] Basic has progressed much since you last looked at it, time > > to update your facts. Basic has recursion, it compiles to native > > code, it has objects, can be event driven and everything else you > > wou

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Gerhard Haering
On Mon, Dec 20, 2004 at 05:04:33PM +0100, Thomas Heller wrote: > Bulba! <[EMAIL PROTECTED]> writes: > > > I'll soon start development of a specialized small app and need > > to choose GUI for it. > > Quoting a somewhat popular german blogger, on the state of cross > platform Python GUI toolkits

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 -- http://mail.python.org/mailman/listinfo/pyth

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: ###

[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 Ja

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

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

[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 log.

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 co

[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 her

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 o

[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 system

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 si

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

[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 allow

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 n

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 da

[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 Programm