Skip to content

Commit 251b3a7

Browse files
authored
Add FAQ page with info on line endings (#246)
1 parent a8bc3a5 commit 251b3a7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/faq.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
requently-Asked Questions
2+
==========================
3+
4+
My script works when launched as ``python3 script.py`` but exits immediately or throws an error when launched from Brickman or as ``./script.py``
5+
-----
6+
7+
This may occur if your file includes Windows-style line endings, which are often
8+
inserted by editors on Windows. To resolve this issue, open an SSH session and
9+
run the following command, replacing ``<file>`` with the name of the Python file
10+
you're using:
11+
12+
.. code:: shell
13+
14+
sed -i 's/\r//g' <file>
15+
16+
This will fix it for the copy of the file on the brick, but if you plan to edit
17+
it again from Windows you should configure your editor to use Unix-style endings.
18+
For PyCharm, you can find a guide on doing this `here <https://www.jetbrains.com/help/pycharm/2016.2/configuring-line-separators.html>`_.
19+
Most other editors have similar options; there may be an option for it in the
20+
status bar at the bottom of the window or in the menu bar at the top.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
spec
1414
rpyc
15+
faq
1516

1617
Indices and tables
1718
==================

0 commit comments

Comments
 (0)