Prefs

Latest version: v1.0.1

Safety actively analyzes 688705 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

0.2.50

- `PREFSBase` class
- Now `filename` parameter includes the extension too.
- Fixed path detection on `create_prefs`
- Now writes the representation of a string, not just the string with quotes around it.
- Now it uses `ast.literal_eval` insead of `eval` to evaluate strings.
- Now `separator_char`, `ender_char`, `continuer_char` and `comment_char` are constantes (no parameters).
- Now `file` attribute it's an property method that calls `read_prefs`.
- Removed `dictionary` parameter.
- Setted split to 1 when splitting key and value.
- Added `dump` method that returns an string with `prefs` dictionary as PREFS format.

- Added `VERSION` constant variable.
- Added `split_path` function.
- Added `accumulate_list` function.

0.2

- Added `write_multiple_prefs` function which requires a list of prefs and a list of values to change. With this function writing multiple prefs will be more efficiently.

0.1.99

- Added `auto_generate_keys` parameter.

0.1.98

- Added `indent` parameter.
- Comment your own PREFS files (and change the comment character ``).

0.1.95

- Deleted `readPREFS.py` and `createPREFS.py`.
- Added `PREFS_Base` class and changed `read_prefs_file` function and `convert_to_prefs` function using `PREFS_Base` class.

0.1.91

- Replaced:
py
import sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))

from readPREFS import ReadPREFS
from createPREFS import CreatePREFS

With:
py
if __name__ == '__main__':
from readPREFS import ReadPREFS
from createPREFS import CreatePREFS
else:
from .readPREFS import ReadPREFS
from .createPREFS import CreatePREFS

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.