April 2018
Beginner
340 pages
7h 54m
English
The main changes we will need to make will be in the texteditor.py file. Open up this file and add the following:
...import osfrom pathlib import Path...def __init__(self): ... self.config_dir = os.path.join(str(Path.home()), ".tkedit") self.default_scheme_path = os.path.join(self.config_dir, 'schemes/default.yaml') self.python_language_path = os.path.join(self.config_dir, 'languages/python.yaml') self.font_scheme_path = os.path.join(self.config_dir, 'schemes/font.yaml') self.create_config_directory_if_needed()
In order to access the user's home directory independent of the OS, we will use the pathlib module. The folder where we will be storing the user's YAML files will be called .tkedit and will ...
Read now
Unlock full access