Skip to content
cdfarrow edited this page Apr 15, 2024 · 4 revisions

flexlibs

flexlibs is a library for accessing FieldWorks Language Explorer (aka "FLEx") projects.

flexlibs handles the necessary initialisation of the FLEx engine, and provides a class (FLExProject) for opening a FLEx project and working with its contents.

For the GUI application that runs Python scripts/plugins on FLEx projects see FLExTools, which is built on flexlibs.

Requirements

Python 3.8 - 3.12.

Python for .NET version 3.0.3.

FieldWorks Language Explorer 9.0.17 - 9.1.24.

32-bit vs 64-bit

The Python architecture must match that of FieldWorks. I.e. Install 32-bit Python for 32-bit FieldWorks, and 64-bit Python for 64-bit FieldWorks.

Installation

Run: pip install flexlibs

Usage

Initialise the library and instantiate a FLExProject object as shown in this example code:

import flexlibs
flexlibs.FLExInitialize()
p = flexlibs.FLExProject()
p.OpenProject("Sena3")

for entry in p.LexiconAllEntries():
    # process lexical entry

p.CloseProject()
flexlibs.FLExCleanup()

Documentation

  • The FLExProject API is documented at the path given by flexlibs.APIHelpFile.
  • The help file FLExTools Programming.pdf in the FLExTools project includes information on using the API.
  • Technical documentation for the FieldWorks data model ("Language and Culture Model" or "LCM") can be found here.

Licence

flexlibs is licensed under LGPL version 2.1 or later.

Clone this wiki locally