![]() ![]() Use app(id='7') instead of app('FileMaker Pro') to be sure only /FileMakerPro 7 is launched get())) # 92 93 # show "List" layout with the records from qr圓, sorted by authors 94 95 qr圓. get())) 89 90 print " \n select distinct author from library: " 91 pprint( set( t1. exists(): 87 print " \n select title, authors from library where genre contains \' Thrillers \' : " 88 pprint( zip( qr圓. contains( u ' Thrillers ')) 85 86 if qr圓. exists(): 81 print " \n select title from library where author contains \' McCaffrey \' : " 82 pprint( qry2. contains( u ' McCaffrey ')) 79 80 if qry2. exists(): 75 print " \n select title from library where title contains \' Calvin \' : " 76 pprint( qry1. record, with_data= data, at= t1) # 62 63 f. open( IMPORTFILE, ' r ', ' mac_roman ') 58 59 for line in f: 60 data = line. get()) 40 41 print " \n Table ' %s ' schema: \n (name, type, nulls OK, unique value, global value) " % TBLNAME 42 pprint( zip( 43 t1. tables 37 38 print " \n Table ' %s ' has %d field(s): " % ( TBLNAME, t1. databases # 32 33 print " \n Database ' %s ' has %d table(s): " % ( DBNAME, db. open( FSSpec( DBPATH)) # 22 23 24 """ 25 Querying database schema 26 """ 27 28 print " FileMaker has %d database(s) opened: " % fm. File import FSSpec 6 import codecs 7 8 DBPATH = ' /Users/SOMEUSER/Desktop/Library.fp7 ' 9 DBNAME = ' Library ' 10 TBLNAME = ' Library ' 11 IMPORTFILE = ' /Users/SOMEUSER/Desktop/library.tab ' 12 13 14 """ 15 Connecting to /FileMaker and opening database 16 """ 17 18 fm = app( id= ' 7 ') # 19 20 if not fm. 1 #!/usr/bin/pythonw 2 3 from pprint import pprint 4 from appscript import * 5 from Carbon. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |