[FAQTS] Python Knowledge Base Update -- June 12th, 2000

Fiona Czuczman fiona at sitegnome.com
Mon Jun 12 09:27:51 EDT 2000
Hello All!

Here are the latest entries into http://python.faqts.com

'night,

Fiona Czuczman


## New Entries #################################################


-------------------------------------------------------------
Where can I get good Tutorials about JPython?
Where can I get good Tutorials about JPython?
http://www.faqts.com/knowledge-base/view.phtml/aid/3668
-------------------------------------------------------------
Fiona Czuczman
Moshe Zadka

JPython is another implementation of the Python language: everything you
learn in the Python tutorial (http://www.python.org/doc/tut/tut.html),
will be true for JPython. You can review the CPython/JPython differences
somewhere in the JPython site (http://www.jpython.org).


-------------------------------------------------------------
VBScript is excellent for integrating with ADO (Active Data Objects) databases.  Is python as facile?
http://www.faqts.com/knowledge-base/view.phtml/aid/3669
-------------------------------------------------------------
Fiona Czuczman
Eduard Hiti

I used ADO 2.5 in my last Python project, and had no problems at all. 
Most of the time, ADO access in VB translates almost directly to python 
syntax. Features of ADO I used with no problem include parameterized 
commands, batch updating and client side cursors.

One thing to keep in mind is the way pythoncom handles out-parameters of
method calls: These values are returned as part of the method result, 
e.g the Execute method of the Connection object returns a tuple 
consisting of an RecordSet object and the RecordsAffected value (see 
MSDN):

    recordset, affected = db_connect.Execute("select * from ...")

In VB you would only get the recordset returned and RecordsAffected 
would get stuffed in a reference parameter of the call.

Another point is handling of date values: They are returned as objects 
with type pywintypes.TimeType. The documentation for this type is very 
terse, and I had to dig into the pythoncom demos to find their 
interface: One useful method is Format(<formatstring>), which will 
return a string from TimeType:

    import pywintypes
    if type(x) == pywintypes.TimeType:
        return x.Format("%d.%m.%Y")

For more information on COM and Python I recommend Mark Hammond's 
"Python Programming on Win32" (which covers almost the entire COM body, 
albeit sometimes not too deeply: "Advanced Python Programming..." ?), 
which has a chapter on database programming.


-------------------------------------------------------------
Where can I download python DBI for MYSQL?
http://www.faqts.com/knowledge-base/view.phtml/aid/3667
-------------------------------------------------------------
Fiona Czuczman
richard_chamberlain

http://dustman.net/andy/python/MySQLdb/

Probably best to look at http://www.vex.net/parnassus for most modules.







More information about the Python-list mailing list