Skip to content

runinfls.py to execute FontLab Python scripts from outside of FLS

License

Notifications You must be signed in to change notification settings

moyogo/runinfls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

See http:https://forum.fontlab.com/python-scripting/new-script-runinfls-py-to-execute-fontlab-python-scripts-from-outside-of-fls/

Attached is a Python script "runinfls.py" which can be used to execute another FontLab Python script from outside of FontLab Studio. This runinfls.py script can be used from the commandline, where the script to be executed is given as argument (the filename or extension of the script does not matter). It can also be used as a module within other scripts. In such case, the Python code to be executed within FLS can be given as a file path, Python file object, or string. The main advantage of the runinfls.py script is that:

  1. It automatically locates the most recent version of FontLab Studio and executes the script within it.
  2. It adds the missing _file_ functionality, i.e. when the script is running from a file, FontLab Studio "knows" its original location. The latter functionality can potentially be useful when writing installation routines that should put some files inside of the FontLab data folders. The script comes with a small example file. Unpack the attached runinfls-1.10.zip archive, and then: To run it on Mac OS X, open Terminal, navigate to the unpacked contents (using "cd") and type:
python runinfls.py test.flpy

To run it on Windows, click on the Start button, type in "cmd" (or choose Run and type in "cmd"), navigate to the unpacked contents (using "cd") and type:

c:\python24\python runinfls.py test.flpy

The runinfls.py script is opensource under the MIT License.

Regards,
Adam Twardoch
Fontlab Ltd.

About

runinfls.py to execute FontLab Python scripts from outside of FLS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages