[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread Gerhard Häring
Gerhard Häring added the comment: Isn't this issue at least partly about the statement parsing code in the sqlite module? I've fixed this upstream a while ago in https://github.com/ghaering/pysqlite/commit/94eae5002967a51782f36ce9b7b81bba5b4379db Could somebody perhaps bring

[issue19065] sqlite3 timestamp adapter chokes on timezones

2015-08-23 Thread Gerhard Häring
Gerhard Häring added the comment: I'm -1 because I believe that ultimately, adapters and converters were a mistake to add to pysqlite. That's why I deprecated them in pysqlite 2.8.0. Do you know what would be the correct step to propose a deprecation in the sqlite3 module of Python proper

[issue16379] SQLite error code not exposed to python

2015-08-23 Thread Gerhard Häring
Gerhard Häring added the comment: I propose to also set the SQLite extended error code if this is implemented. What's the reasoning behind offering a error code to name mapping? This seem problematic to me. In case a newer SQLite version introduces a new error code, this error code cannot

Re: [python-sqlite] Re: pysqlite 2.8.0 released

2015-08-21 Thread Gerhard Häring
externally hosted files were ignored as access to them may be unreliable (use --allow-external to allow). No distributions matching the version for pysqlite==2.8.0 On Tuesday, August 18, 2015 at 8:17:46 PM UTC-4, Gerhard Häring wrote: NEW FEATURES - No new features, but tons of bugfixes

[issue16885] SQLite3 iterdump ordering

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: http://bugs.python.org/issue20463 is related. -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16885

[issue3783] dbm.sqlite proof of concept

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: This wiki page is out of date. It appears that SQlite is now threadsafe by default: http://www.sqlite.org/threadsafe.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3783

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: Please note that after the mentioned commit, I restored backwards compatibility with commit https://github.com/ghaering/pysqlite/commit/796b3afe38cfdac5d7d5ec260826b0a596554631 Now the only difference is that the implicit commits *before* DDL statements

pysqlite 2.8.0 released

2015-08-19 Thread Gerhard Häring
NEW FEATURES - No new features, but tons of bugfixes. These mean that things now work that didn't before: - Transactional DDL now works - You can use SAVEPOINTs now BUILD PROCESS - Python 2.7.x is now required. If trying to use it with Python 3, print a useful error message. Integrated

[issue16958] The sqlite3 context manager does not work with isolation_level=None

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: I'm +1 on deprecating the connection manager -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16958

[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: apsw contains code that handles the issues with dumping SQLite databases very well. I plan to integrate this code into pysqlite. We can then later port the fix to the sqlite3 module. See https://github.com/ghaering/pysqlite/issues/10 for the tasks and https

[issue11691] sqlite3 Cursor.description doesn't set type_code

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: There is no guarantee that all any column in a SQlite resultset always has the same type. That's why I decided to err on the side of setting the type code to undefined. Closing as wontfix. -- resolution: - wont fix status: open - closed

[issue24887] Sqlite3 has no option to provide open flags

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: It requires switch to the v2 open function of the SQLite C API. While we're at it, we can also enable URI filenames. -- assignee: - ghaering nosy: +ghaering versions: +Python 3.6 -Python 3.4 ___ Python tracker rep

[issue19065] sqlite3 timestamp adapter chokes on timezones

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: I'm -1 on adding timezone to the adapters. -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19065

[issue16379] SQLite error code not exposed to python

2015-08-19 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16379 ___ ___ Python-bugs-list

[issue21250] sqlite3 doesn't have unit tests for 'insert or [algorithm]' functionality.

2015-08-19 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21250 ___ ___ Python-bugs-list

[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2015-08-19 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16864 ___ ___ Python-bugs-list

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-08-19 Thread Gerhard Häring
Gerhard Häring added the comment: The externally maintained version of the sqlite3 module has now been switched to the v2 statement API. pysqlite is for Python 2.7 only. I'd suggest to revisit this for Python 3.6 and then try to port most fixes from pysqlite to the sqlite3 module

[issue13299] namedtuple row factory for sqlite3

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13299 ___ ___ Python-bugs-list

[issue20587] sqlite3 converter not being called

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20587

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10740 ___ ___ Python-bugs-list

[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20463 ___ ___ Python-bugs-list

[issue11691] sqlite3 Cursor.description doesn't set type_code

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: docs@python - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11691 ___ ___ Python

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9924 ___ ___ Python-bugs-list

[issue20274] sqlite module has bad argument parsing code, including undefined behavior in C

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20274

[issue20562] sqlite3 returns result set with doubled first entry

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20562

[issue16958] The sqlite3 context manager does not work with isolation_level=None

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16958 ___ ___ Python-bugs-list

[issue21465] sqlite3 Row can return duplicate keys when using adapters

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21465 ___ ___ Python-bugs-list

[issue13583] sqlite3.Row doesn't support slice indexes

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13583 ___ ___ Python-bugs-list

[issue21836] Fix sqlite3 in unicodeless build

2015-01-10 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21836 ___ ___ Python-bugs-list

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-01-05 Thread Gerhard Häring
Gerhard Häring added the comment: ok, i will have to look into this -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9303 ___ ___ Python-bugs-list

[issue22956] Improved support for prepared SQL statements

2015-01-03 Thread Gerhard Häring
Gerhard Häring added the comment: The low-hanging fruit of executemany() reusing the prepared statement is of course taken. Also, there is a statement cache that is being used transparently. I am against exposing the statement directly via the API. -- assignee: - ghaering nosy

[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2015-01-03 Thread Gerhard Häring
Gerhard Häring added the comment: I have now committed a fix in the pysqlite project at github. https://github.com/ghaering/pysqlite/commit/f67fa9c898a4713850e16934046f0fe2cba8c44c I'll eventually merge it into the Python tree. -- assignee: - ghaering nosy: +ghaering

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2015-01-03 Thread Gerhard Häring
Gerhard Häring added the comment: Reusing the apsw connection in the sqlite3 module was deprecated a long time ago. It is simply not supported, even if there is still code left in the module that supports this somewhat. This code should then be removed. This closing as wontfix

[issue14076] sqlite3 module ignores placeholders in CREATE TRIGGER code

2015-01-03 Thread Gerhard Häring
Gerhard Häring added the comment: The sqlite3 module is not at fault here. If it does not work, then is is a restriction of SQLite3 - at which places it accepts bind parameters. This closing as not a bug. -- assignee: - ghaering resolution: - not a bug status: open - closed

[issue15460] SQLite cursor.description is not DB-API compatible

2012-07-27 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: SQLite's columns aren't typed, only SQLite values are. So it's entirely possible for the same column to have different types, like the NULL type, the INTEGER type and the TEXT type. It's thus impossible to give meaningful type information

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Without SQLITE_OMIT_LOAD_EXTENSION, builds will break on Mac OS X 10.5 and 10.6 and maybe other platforms. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020

[issue10020] docs for sqlite3 describe functions not available without recompiling

2010-10-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Fixed in r85208 by adding a note to the docs. -- resolution: - fixed status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10020

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2010-09-23 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Yes Mike. Avoiding unnecessary locks was exactly the reason for this behaviour. I agree that for serializable transactions I'd need to make some changes. -- ___ Python tracker rep...@bugs.python.org

Re: are there pros or contras, keeping a connection to a (sqlite) database ?

2010-09-09 Thread Gerhard Häring
On Thu, Sep 9, 2010 at 12:29 AM, CM cmpyt...@gmail.com wrote: [...] I'm not even sure what a connection really is; I assumed it was nothing more than a rule that says to write to the database with the file named in the parentheses. [...] The following list is not exclusive, but these are the

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list

[issue6683] smtplib authentication - try all mechanisms

2010-08-17 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Wow! That's great! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6683 ___ ___ Python-bugs

[issue3854] Document sqlite3 vs. threads

2010-08-06 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Fixed in r83747. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3854

[issue9510] sqlite3.Warning isnt a subclass of exceptions.Warning

2010-08-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: PEP 0249 says that the module's Warning class must be a subclass of StandardError. So I reject your proposed change. There are only two cases where pysqlite raises Warning, and these could be changed to ProgrammerError anyway

[issue6683] smtplib authentication - try all mechanisms

2010-08-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Fixed in r83742. I implemented this without a test case, because if we wait for a test case for this, we can wait forever (would need a SMTP server implementation in Python for the various auth methods

[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-08-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: There is too little value changing the paramstyle attribute. I think the documentation clearly states that both parameter binding methods are supported. -- resolution: - rejected status: open - closed

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2010-08-05 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- nosy: -ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4032 ___ ___ Python-bugs-list

[issue588756] python should obey the FHS

2010-08-03 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- nosy: -ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue588756 ___ ___ Python-bugs-list

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2010-07-19 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Yes, the sqlite module uses the old API, and is written to work with older SQLite releases and their respective bugs as well. Using the new API will mean requiring newer SQLite releases. If we do this, then this is the chance to remove all

rich comparison fscks up reference count?

2010-04-12 Thread Gerhard Häring
Maybe somebody can enlighten me here. I can't figure out why doing a rich comparison on my object decreases the total reference count by 1. Linked is the minimal test case with a C exension that compiles under both Python 2.6 and 3.1. No external dependencies, except a DEBUG build of Python to

Re: rich comparison fscks up reference count?

2010-04-12 Thread Gerhard Häring
Can be run like this: ghaer...@ws124~/src/gh/test$ python3 setup.py build_ext --inplace running build_ext building 'foo' extension gcc -fno-strict-aliasing -g -fwrapv -O0 -Wall -Wstrict-prototypes - arch i386 -m32 -I/opt/jetstream/include/python3.1 -c foo.c -o build/

Re: rich comparison fscks up reference count?

2010-04-12 Thread Gerhard Häring
On Apr 12, 4:27 pm, Gerhard Häring gerhardhaer...@googlemail.com wrote: Maybe somebody can enlighten me here. I can't figure out why doing a rich comparison on my object decreases the total reference count by 1. [...] Doh! It turned out the strange effect was due to my particular build process

[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-04-10 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: I see that the status of this issue keeps changing. Now does anything in the sqlite3 module or the docs need to be changed? Or what's left to close this? -- ___ Python tracker rep

[issue5872] New C API for declaring Python types

2010-03-25 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5872 ___ ___ Python-bugs-list mailing

[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-23 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: I said qmark vs numeric. I. e. vs: execute(UPDATE authors set name = :1, email = :2, comment = :3 WHERE id = :4, (form.name, form.email, form.text, form.id)) The sqlite3 module will always support both paramstyles qmark and named, simply

[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-22 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Thanks for bringing this up. By changing this we would maybe be a little bit closer to PEP 0249. I don't get why the PEP author thinks that 'qmark' is less clear than 'numeric', though. I think they're equally clear. The real reason why I

[issue8145] Documentation about sqlite3 isolation_level

2010-03-16 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8145 ___ ___ Python-bugs-list mailing

[ANN] pysqlite 2.6.0 released

2010-03-05 Thread Gerhard Häring
pysqlite 2.6.0 released === Release focus: Synchronize with sqlite3 module in Python trunk. pysqlite is a DB-API 2.0-compliant database interface for SQLite. SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL

[issue7670] _sqlite3: Block *all* operations on a closed Connection object

2010-03-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Applied in trunk. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7670

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2010-03-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Fixed in trunk now. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7478

[issue7670] _sqlite3: Block *all* operations on a closed Connection object

2010-03-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Now also fixed in 2.6 and 3.1 maintenance branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7670

[issue7670] _sqlite3: Block *all* operations on a closed Connection object

2010-03-05 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: As requested per Barry, marking this as release blocker for 2.6. -- keywords: +26backport priority: - release blocker stage: patch review - commit review status: closed - open ___ Python tracker rep

Building Python with Scons

2010-03-01 Thread Gerhard Häring
I'm setting up a third-party library project (similar to the one in Google Chromium) where I use SCons as build tool. Now I need to integrate Python, too. Has anybody written a Scons script for Python 2.x or 3.x, yet? -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

[issue7572] Strange issue : cursor.commit() with sqlite

2009-12-29 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- title: Strabge issue : cursor.commit() with sqlite - Strange issue : cursor.commit() with sqlite ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7572

[issue7572] Strange issue : cursor.commit() with sqlite

2009-12-29 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: You confuse two things here: cursors and connections. Indeed closing a connection without calling commit() on it will do an implicit rollback, i. e. any changes on the database will not be persisted. Closing cursors, however does nothing

[issue7572] Strabge issue : cursor.commit() with sqlite

2009-12-24 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Please change your test case so that it works with an in-memory database :memory:. Then you'll also need to include a schema creation command create table, which is missing here. Please also state which behaviour you see and which one you

[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

2009-12-18 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: The error code SQLITE_ERROR from SQLite is used for runtime errors. These can either be caused by the programmer (table does not exist, SQL contains errors) or they can be other problems like constraint violations etc. To differentiate these we

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-18 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: Thanks! I've integrated this into pysqlite (http://code.google.com/p/pysqlite/source/detail?r=6455981b3283b26c147d949a9031a0d74ea7ffe8) and will soon push updates to the version in Python core. In my opinion this changes is not critical enough

Re: Why Doesn't XP Pro Show Size, Time and Date Mod of a Created File?

2009-12-08 Thread Gerhard Häring
W. eWatson wrote: I created a folder, and wrote a file to it. When I look at what files are in it, they are correct. However, The Size, Type, and Date Mod are not shown. Why am I missing those columns? I'm writing files with a suffix of dat, which seem only to match up with video CD movie.

Re: editor with autocompletion

2009-12-04 Thread Gerhard Häring
Siva B wrote: Hi friends, I am writing a new language. So I want an editor with auto complete. I there any such tool in Python ?(not only in python any other) I want it for my new lang IDLE, the Integrated Development Environment included with your Python installation nowadays has

[issue2441] Mac build_install.py script fetches unavailable SQLite version

2009-12-03 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: This has long been fixed. Even for 2.6maint the SQLite version currently being fetched is 3.6.11. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http

Re: dbapi2 select where IN (...)

2009-11-30 Thread Gerhard Häring
yota.n...@gmail.com wrote: hello, I couldn't find how the dbapi2 planned to handle the sql IN statement. ex : SELECT * FROM table WHERE num IN (2,3,8,9); I'd be glad to take advantage of the ? mechanism, but what about tuples ! execute(SELECT * FROM table WHERE num IN ?; ,

Re: IDE+hg

2009-11-24 Thread Gerhard Häring
Rhodri James wrote: On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ nikla...@gmail.com wrote: Dear experts, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial support not found i.e. buttons to clone, commit and push to repositories to define dev env dvcs, editor

Python OpenOffice Spreadsheets

2009-11-23 Thread Gerhard Häring
Is there a *simple* way to read OpenOffice spreadsheets? Bonus: write them, too? I mean something like: doc.cells[0][0] = foo doc.save(xyz.ods) From a quick look, pyodf offers little more than just using a XML parser directly. -- Gerhard --

Re: python and web pages

2009-11-19 Thread Gerhard Häring
Daniel Dalton wrote: Hi, Here is my situation: I'm using the command line, as in, I'm not starting gnome or kde (I'm on linux.) I have a string of text attached to a variable,. So I need to use one of the browsers on linux, that run under the command line, eg. lynx, elinks, links, links2

Re: Python: Text file insert to MySQL

2009-10-07 Thread Gerhard Häring
On Wed, Oct 7, 2009 at 1:32 PM, Schedule ssched...@gmail.com wrote: That was great ! Now I am able to insert the values from the file. Somehow I am not able to update a specific field with all the vaues in the file. For eg:     [...]     c.execute(UPDATE a SET last = %s, row) The database

Re: Python: Text file insert to MySQL

2009-10-06 Thread Gerhard Häring
Schedule wrote: Hello, I am currenty using MySQL 5.1 community server and trying to import the data of the comma delimited text file into the table using python 2.6 scripts. I have installed Mysqldb 1.2.2. follwoing is my script: [...] 7. c.execute(INSERT INTO a (first, last)

Re: Compile kinterbasdb with mingw32 and python 2.6 - DLL load failed

2009-09-21 Thread Gerhard Häring
Laszlo Nagy wrote: The building and installation went find. But I cannot import kinterbasdb because I get a DLL load failed error. I figured out that has something to do with msvcr90 and _ftime. Can you please give me some advice how to solve this problem? Download Microsoft Visual

[issue6683] smtplib authentication - try all mechanisms

2009-08-11 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6683

Re: file comparison

2009-07-31 Thread Gerhard Häring
learner learner wrote: Hi all, I want to compare two text files line by line and eliminate the matching/repeated line and store the unmatched/leftout lines into a third file or overwrite into one of them. gl hf! -- http://mail.python.org/mailman/listinfo/python-list

Re: non-owning references?

2009-07-24 Thread Gerhard Häring
Utpal Sarkar wrote: Hi, [...] You're looking for the weakref module. What you're describing there sounds like a nice exercise, but I cannot imagine why you'd really need to clean it up, if it really is a singleton. -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating xml

2009-07-23 Thread Gerhard Häring
Greg Lindstrom wrote: It's been a while since I've played with XML using Python but I've been asked to create XML using data from our postgres database. Currently we are generating XML directly from the database using a set of stored procedures but it is too slow (yes, I have numbers). I

Re: Column types with DB API

2009-06-28 Thread Gerhard Häring
Thomas Robitaille wrote: Hi, I'm trying to use DB API compliant database modules (psycopg2,MySQLdb,SQLite) to access SQL databases, and I am trying to determine the type of each column in a table. The DB API defines cursor.description which contains information about the column names and

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Gerhard Häring
Scott David Daniels wrote: Nobody wrote: On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: announcement of 3.1 That's a significant improvement All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. Fortunately, I have assiduously

Re: sqlite3, OperationalError: no such column, shouldn't that ne a ProgrammingError?

2009-06-19 Thread Gerhard Häring
Gabriel Rossetti wrote: Hello everyone, I get an OperationalError with sqlite3 if I put the wrong column name, but shouldn't that be a ProgrammingError instead? I read PEP 249 and it says : OperationalError Exception raised for errors that are related to the

Re: sqlite3, OperationalError: no such column, shouldn't that ne a ProgrammingError?

2009-06-19 Thread Gerhard Häring
John Machin wrote: Hi Gerhard, [...] In http://www.sqlite.org/c3ref/prepare.html it says When an error occurs, sqlite3_step() will return one of the detailed error codes or extended error codes. The legacy behavior was that sqlite3_step() would only return a generic SQLITE_ERROR result code

Re: Observer implementations

2009-06-15 Thread Gerhard Häring
Tobias Weber wrote: Hi, how to use the Observer pattern in Python? Implement it in your classes? I found PubSub and PyDispatcher, both of which are abandoned. [...] I haven't searched for these, but googling for python observer pattern yields http://code.activestate.com/recipes/131499/ and

[issue6057] sqlite3 error classes should be documented

2009-05-26 Thread Gerhard Häring
Gerhard Häring g...@ghaering.de added the comment: At the very start of the module's documentation it reads: pysqlite was written by Gerhard Häring and provides a SQL interface compliant with the DB-API 2.0 specification described by PEP 249. Where PEP 249 is a link to the Database API 2.0

Re: command prompt: the ntvdm cpu has encountered an illegal instruction

2009-05-24 Thread Gerhard Häring
Daniel wrote: If I try to invoke python via the command prompt I get an error command prompt: the ntvdm cpu has encountered an illegal instruction... I don't get this problem if I first cd to the python directory. I am running python 3.0 on windows. Running Python from the Cygwin shell?

Re: Learning C++ for Python Development

2009-05-11 Thread Gerhard Häring
joshua.pea...@gmail.com wrote: I am a recovering C# web developer who has recently picked up Django and I'm loving it. I would eventually like to get a job as a Django/Python developer. It seems that many Python jobs require that you also be a C++ developer. I've seen the C++/Python

Re: configuring python with disable-thread in Ubuntu

2009-05-08 Thread Gerhard Häring
Deepak Chandran wrote: Hello, I am embedding python inside a C++ program. For some reason (I think libxml2), I am getting Segmentation fault at PyThread_release_lock. The solution I found online was to configure python with --disable-thread. That doesn't sound like a solution, but like

Re: update python version

2009-05-08 Thread Gerhard Häring
km wrote: Hi all, Is there a way to update python 2.6.1 to 2.6.2 using easy_install ? No, easy_install installs Python packages. It doesn't upgrade Python itself. If this is Windows, just install the newer Python version. No need to uninstall the 2.6.1 first. If this is some Unix variant,

Re: Web framework for embedded system

2009-04-28 Thread Gerhard Häring
Thomas Heller wrote: I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. The web application will not be too fancy, no databases involved for

Re: Memory problems (garbage collection)

2009-04-23 Thread Gerhard Häring
Carbon Man wrote: Very new to Python, running 2.5 on windows. I am processing an XML file (7.2MB). Using the standard library I am recursively processing each node and parsing it. The branches don't go particularly deep. What is happening is that the program is running really really

Re: Memory problems (garbage collection)

2009-04-23 Thread Gerhard Häring
Here's a link for you: http://wiki.python.org/moin/PythonSpeed/PerformanceTips which also talks about string concatenation and othere do's and don'ts. -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: value error

2009-04-23 Thread Gerhard Häring
Francesco Pietra wrote: hi: with script data = open('134-176_rectified_edited.pdb', 'r') outp = open('134-176_renumbered.pdb', 'w') for L in data: if L[3] == 'M': L = L[:24] + %4d % (int(L[24-28])+133) + L[28:] outp.write(L) i wanted to modify lines of the type: ATOM

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Gerhard Häring
Peter Otten wrote: bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items: ... to verify that items is a non-empty list are a widespread

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Gerhard Häring
Deep_Feelings wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3 ? (especially libraries ) The problem is: there is

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Gerhard Häring
Martin v. Löwis wrote: Are they widespread? I haven't noticed, yet. I prefer to write it explicitly: if len(lst) 0: I prefer to test explicitly for the truth value of the list. I don't want to test whether the length of the list is greater than 0 (in fact, I don't care about the length

WHIFF - was: Re: Using Python after a few years of Ruby

2009-04-15 Thread Gerhard Häring
Aaron Watters wrote: On Apr 15, 3:49 am, Tim Hoffman zutes...@gmail.com wrote: There are plenty of python web frameworks, some have quite different approaches, what suits you will depend very much on your own bias, interest. I've had a lot of luck with WHIFF (

Re: [ANN] Falcon - powering innovation

2009-04-13 Thread Gerhard Häring
Kless wrote: If anybody is interesed in new technologies, you'll love this new language called Falcon [1], which has been open sourced ago little time. Falcon is a scripting engine ready to empower mission-critical multithreaded applications. Mission-critical and empower sound like a good

  1   2   3   4   >