[Pythonmac-SIG] Getting data out of FileMaker fast

Erik van Blokland erik@letterror.com
Mon, 27 Mar 2000 13:03:06 +0200


-- Pieter Claerhout [3/27/00 12:30 PM]:

>what is the fastest way to transfer data from FileMaker Pro on the Macintosh
>to Python. I made a set of databases in Filemaker, and I want to convert 
>these
>to static HTML using Python, but this has to be quite fast.
>
>I tested it with the FileMaker vs Python package from LettError, but it's 
>not fast
>enough for what I want to do with it. 
I know. But it's the appleevents that slow it down, not the LettError 
code ;) Have you tried the mydb.getfield('fieldname'), this returns all 
relevant cells (the field 'fieldname' from each record in the found set) 
in one go. If you select a field with the html output, you should get all 
html through one appleevent, rather than stepping through them one by one 
which is slow. If you don't have getfield, I can send you a new version 
of the module.

>Any idea on how to speed up things?
Consider exporting the contents as a tab-seperated text, then open that 
file in python and split it along returns and tabs. This is certainly the 
fastest way. If the file is *really* big, you can try reading the data 
line by line (record by record). If you want to make the entire process 
run automatically, you could use the FMPro module to execute a script in 
filemaker that exports the data to the a file (or write an external 
applescript), and then open the file in python to do the rest.

cheers,
erik van blokland