Python Version: 3.11.4
I'm using a VENV called FontTools
with all my dependencies installed.
Script:
import os.path
import sys
from fontTools import ttLib
from fontmeta import FontMeta
if len(sys.argv) > 1:
print("Usage: Only one argument required: [FONT]")
exit(1)
fontfile = sys.argv[1]
meta_instance = FontMeta(fontfile)
metadata = meta_instance.get_full_data()
print(metadata)
Usage:
D:\Dev\Python\Font Scripts> python getFontMeta.py "SharpSans-Bold.otf"
Returns:
Usage: Only one argument required: [FONT]
I inspected sys.argv[0]
, and it's set to the name of my script: getFontMeta.py
sys.argv[1]
is set to the font I passed in.
Why is this happening? This script worked before, is this new behavior in Python v3.11.4?
Thanks for any help.