Repository navigation
Updated README, FAQ, and CONTRIBUTING documentation #653
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
Merged
WasabiFan
merged 4 commits into
ev3dev:ev3dev-stretch
from
bpmerkel:ev3dev-lang-python-readme
Jul 28, 2019
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
313e402
Updated README, FAQ, and CONTRIBUTING documentation
bpmerkel c1bd6c7
changed to link; per code review; added MoveDifferential
bpmerkel 6af2b0c
Move `Demo Code` section from FAQ to README
bpmerkel e3970c1
Relocated Demo Code section
bpmerkel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,81 @@ | ||
| Frequently-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`` | ||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| Q: Why does my Python program exit quickly or immediately throw an error? | ||
|
bpmerkel marked this conversation as resolved.
Resolved
|
||
| A: This may occur if your file includes Windows-style line endings | ||
| (CRLF--carriage-return line-feed), 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: | ||
|
|
||
| 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 | ||
| .. code:: shell | ||
| sed -i 's/\r//g' <file> | ||
| sed -i 's/\r//g' <file> | ||
| 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 | ||
| line endings (LF--line-feed). 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. | ||
|
|
||
| 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. | ||
| Q: Where can I learn more about the ev3dev operating system? | ||
| A: `ev3dev.org`_ is a great resource for finding guides and tutorials on | ||
| using ev3dev, straight from the maintainers. | ||
|
|
||
| Q: How can I request support on the ev3dev2 Python library? | ||
| A: If you are having trouble using this library, please open an issue | ||
| at `our Issues tracker`_ so that we can help you. When opening an | ||
| issue, make sure to include as much information as possible about | ||
| what you are trying to do and what you have tried. The issue template | ||
| is in place to guide you through this process. | ||
|
|
||
| Q: How can I upgrade the library on my EV3? | ||
| A: You can upgrade this library from an Internet-connected EV3 with an | ||
| SSH shell as follows. Make sure to type the password | ||
| (the default is ``maker``) when prompted. | ||
|
|
||
| .. code-block:: bash | ||
| sudo apt-get update | ||
| sudo apt-get install --only-upgrade python3-ev3dev2 | ||
| Q: Are there other useful Python modules to use on the EV3? | ||
| A: The Python language has a `package repository`_ where you can find | ||
| libraries that others have written, including the `latest version of | ||
| this package`_. | ||
|
|
||
| Q: What compatibility issues are there with the different versions of Python? | ||
| A: Some versions of the ev3dev_ distribution come with | ||
| `Python 2.x`_, `Python 3.x`_, and `micropython`_ installed, | ||
| but this library is compatible only with Python 3 and micropython. | ||
|
|
||
| .. _ev3dev: http://ev3dev.org | ||
| .. _ev3dev.org: ev3dev_ | ||
| .. _Getting Started: ev3dev-getting-started_ | ||
| .. _ev3dev Getting Started guide: ev3dev-getting-started_ | ||
| .. _ev3dev-getting-started: http://www.ev3dev.org/docs/getting-started/ | ||
| .. _upgrade the kernel before continuing: http://www.ev3dev.org/docs/tutorials/upgrading-ev3dev/ | ||
| .. _detailed instructions for USB connections: ev3dev-usb-internet_ | ||
| .. _via an SSH connection: http://www.ev3dev.org/docs/tutorials/connecting-to-ev3dev-with-ssh/ | ||
| .. _ev3dev-usb-internet: http://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-usb/ | ||
| .. _our Read the Docs page: http://python-ev3dev.readthedocs.org/en/ev3dev-stretch/ | ||
| .. _ev3python.com: http://ev3python.com/ | ||
| .. _FAQ: http://python-ev3dev.readthedocs.io/en/ev3dev-stretch/faq.html | ||
| .. _our FAQ page: FAQ_ | ||
| .. _our Issues tracker: https://github.com/ev3dev/ev3dev-lang-python/issues | ||
| .. _EXPLOR3R: demo-robot_ | ||
| .. _demo-robot: http://robotsquare.com/2015/10/06/explor3r-building-instructions/ | ||
| .. _robot-square: http://robotsquare.com/ | ||
| .. _Python 2.x: python2_ | ||
| .. _python2: https://docs.python.org/2/ | ||
| .. _Python 3.x: python3_ | ||
| .. _python3: https://docs.python.org/3/ | ||
| .. _package repository: pypi_ | ||
| .. _pypi: https://pypi.python.org/pypi | ||
| .. _latest version of this package: pypi-python-ev3dev_ | ||
| .. _pypi-python-ev3dev: https://pypi.python.org/pypi/python-ev3dev2 | ||
| .. _ev3dev Visual Studio Code extension: https://github.com/ev3dev/vscode-ev3dev-browser | ||
| .. _Python + VSCode introduction tutorial: https://github.com/ev3dev/vscode-hello-python | ||
| .. _nano: http://www.ev3dev.org/docs/tutorials/nano-cheat-sheet/ | ||
| .. _Micropython: http://python-ev3dev.readthedocs.io/en/ev3dev-stretch/micropython.html | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.