I am beginning to think that I cannot use Python import in this way.
font_list = [
'HIRANGANA_FONT',
'GREEK_FONT',
'EXT_LATIN_FONT',
'CONTROL_FONT',
'BOX_FONT',
'BLOCK_FONT',
'BASIC_LATIN_FONT',
'CP437_FONT_ROT90',
'CP437_FONT_ROT180',
'CP437_FONT_ROT270',
'VINCENT_FONT',
'CP437_FONT',
'SINCLAIRS_FONT',
'LCD_FONT',
'TINY_FONT',
];
from fonts_file import i for i in font_list
SyntaxError: invalid syntax
So I try:
for i in font_list:
from fonts_file import i
ImportError: cannot import name i
Is it possible? Can I import everything in font_list from one line of code?
I know this below works, but I am trying to keep things left justified
from fonts_file import HIRANGANA_FONT, GREEK_FONT, EXT_LATIN_FONT, CONTROL_FONT, BOX_FONT, BLOCK_FONT, BASIC_LATIN_FONT....