From b4a42ba0fd9a820f3cf5c8421a25b8fcadd46b9e Mon Sep 17 00:00:00 2001 From: Simone Raimondi Date: Tue, 17 Dec 2024 14:48:51 +0100 Subject: [PATCH 1/4] Added warning comment --- doc/source/intro.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/intro.rst b/doc/source/intro.rst index e06d2026fc..4524ffcca3 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -83,6 +83,11 @@ The following example imports a CDB file. See :class:`.FeFormat` for a list of supported FE formats. Check out the :ref:`input_file_for_pyacp` section to see how input files can be created. +.. warning:: + When working on Windows, be careful of possible **escape sequences** in paths that could result in errors. + To avoid issues, make sure to quote the backslashes in your path or use a *raw string literal* by prefixing your string with *r*, + like ``model = acp.import_model(r"path\to\your\model.acph5")``. + Start modelling ~~~~~~~~~~~~~~~ From c3d1dd3f38fc8721eaafd1b61c4c0f86250337cb Mon Sep 17 00:00:00 2001 From: Simone Raimondi Date: Tue, 17 Dec 2024 15:13:45 +0100 Subject: [PATCH 2/4] Changed to danger directive --- doc/source/intro.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 4524ffcca3..3c1e467866 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -83,9 +83,9 @@ The following example imports a CDB file. See :class:`.FeFormat` for a list of supported FE formats. Check out the :ref:`input_file_for_pyacp` section to see how input files can be created. -.. warning:: +.. danger:: When working on Windows, be careful of possible **escape sequences** in paths that could result in errors. - To avoid issues, make sure to quote the backslashes in your path or use a *raw string literal* by prefixing your string with *r*, + To avoid issues, make sure to quote the backslashes in your path or use a *raw string literal* by prefixing your string with **r**, like ``model = acp.import_model(r"path\to\your\model.acph5")``. From e6467a09e301563e9e778c105be1688ed9444bff Mon Sep 17 00:00:00 2001 From: Simone Raimondi Date: Wed, 18 Dec 2024 13:42:09 +0100 Subject: [PATCH 3/4] Added links to documentation, minor changes --- doc/source/intro.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 3c1e467866..084e15f5b2 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -84,8 +84,10 @@ See :class:`.FeFormat` for a list of supported FE formats. Check out the :ref:`input_file_for_pyacp` section to see how input files can be created. .. danger:: - When working on Windows, be careful of possible **escape sequences** in paths that could result in errors. - To avoid issues, make sure to quote the backslashes in your path or use a *raw string literal* by prefixing your string with **r**, + When working on Windows, be careful of possible + `escape sequences `_ in paths that could result in errors. + To avoid issues, make sure to quote the backslashes (by using ``\\``) or use a + `raw string literal `_ by prefixing your string with **r**, like ``model = acp.import_model(r"path\to\your\model.acph5")``. From 4e7e5cee640e86b219fdca13d825e318cefda96d Mon Sep 17 00:00:00 2001 From: Simone Raimondi Date: Wed, 18 Dec 2024 16:34:15 +0100 Subject: [PATCH 4/4] Update doc/source/intro.rst Co-authored-by: Dominik Gresch --- doc/source/intro.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 084e15f5b2..7b2211a8d2 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -84,8 +84,8 @@ See :class:`.FeFormat` for a list of supported FE formats. Check out the :ref:`input_file_for_pyacp` section to see how input files can be created. .. danger:: - When working on Windows, be careful of possible - `escape sequences `_ in paths that could result in errors. + When working on Windows, be careful of backslashes in paths: These may correspond to + `escape sequences `_, resulting in errors. To avoid issues, make sure to quote the backslashes (by using ``\\``) or use a `raw string literal `_ by prefixing your string with **r**, like ``model = acp.import_model(r"path\to\your\model.acph5")``.