You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIQC works on Mac, Linux, Windows. Managing local files can be a pain across different operating systems as they don't all use bash or they use 'backward/no trailing' slash versus 'forward/trailing' slash.
Problem
In some cases, Python-based OS-agnostic methods like os.makedirs() are used. However, in other situations, we are still using cmd_file_create = 'echo "test" >> ' + app_dir + file_name.
The Python methods were written for this use case, so we should use them!
Solution
Go through the lines of code related to configuration file and database creation and convert manual sys commands to Python based commands wherever possible. Decide if we should switch to using: https://docs.python.org/3/library/pathlib.html
Must test any changes across Windows, Mac, and Linux.
The text was updated successfully, but these errors were encountered:
aiqc
changed the title
OS agnostic Python methods for handling configuration files.
pathlib - OS agnostic Python methods for handling configuration files.
Apr 1, 2021
Background
AIQC works on Mac, Linux, Windows. Managing local files can be a pain across different operating systems as they don't all use bash or they use 'backward/no trailing' slash versus 'forward/trailing' slash.
Problem
In some cases, Python-based OS-agnostic methods like
os.makedirs()
are used. However, in other situations, we are still usingcmd_file_create = 'echo "test" >> ' + app_dir + file_name
.The Python methods were written for this use case, so we should use them!
Solution
Go through the lines of code related to configuration file and database creation and convert manual sys commands to Python based commands wherever possible. Decide if we should switch to using: https://docs.python.org/3/library/pathlib.html
Must test any changes across Windows, Mac, and Linux.
The text was updated successfully, but these errors were encountered: