Repository navigation
Add FAQ page with info on line endings #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| requently-Asked Questions | ||
| ========================== | ||
|
|
||
| My script works when launched as ``python3 script.py`` but exits immediately or throws an error when launched from Brickman or as ``./script.py`` | ||
| ----- | ||
|
|
||
| This may occur if your file includes Windows-style line endings, which are often | ||
| inserted by editors on Windows. To resolve this issue, open an SSH session and | ||
| run the following command, replacing ``<file>`` with the name of the Python file | ||
| you're using: | ||
|
|
||
| .. code:: shell | ||
| sed -i 's/\r//g' <file> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There used to be a dos2unix utility, not sure if it's available by default on the ev3 though.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It still exists but is not installed by default, so I decided to go with the built-in option.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| This will fix it for the copy of the file on the brick, but if you plan to edit | ||
| it again from Windows you should configure your editor to use Unix-style endings. | ||
| For PyCharm, you can find a guide on doing this `here <https://www.jetbrains.com/help/pycharm/2016.2/configuring-line-separators.html>`_. | ||
| Most other editors have similar options; there may be an option for it in the | ||
| status bar at the bottom of the window or in the menu bar at the top. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
|
|
||
| spec | ||
| rpyc | ||
| faq | ||
|
|
||
| Indices and tables | ||
| ================== | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a one line title. Otherwise rst does not recognize it as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can tell I was distracted while writing this 😆 Three times I wrapped this line, and three times I realized it was broken and fixed it.