Skip to content

Commit 5f8ab1c

Browse files
authored
Merge pull request #292 from srobo/pycharm-instructions
2 parents fc27860 + fba331c commit 5f8ab1c

File tree

7 files changed

+31
-3
lines changed

7 files changed

+31
-3
lines changed

_data/sidebar_tree.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ tree:
6666
- url: /programming/editors/
6767
title: Code Editors
6868
tree:
69+
- url: /programming/editors/pycharm
70+
title: PyCharm
6971
- url: /programming/editors/vscode
70-
title: VSCode
72+
title: Visual Studio Code
7173
- url: /rules/
7274
title: Rules
7375
tree:
12.4 KB
Loading
94.9 KB
Loading
42.8 KB
Loading

programming/editors/pycharm.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: page
3+
title: PyCharm
4+
---
5+
6+
# PyCharm Setup
7+
8+
<div class="info">
9+
These instructions should also apply to IntelliJ IDEA with the Python plugin installed although the location of Python SDK settings will be different.
10+
</div>
11+
12+
In order to take full advantage of PyCharm's smart assistance features, such as code completion, PyCharm needs to have access to the libraries used in your code.
13+
The following instructions will guide you through setting up your local environment to have access our `sr.robot3` API.
14+
15+
1. Open your robot code project in PyCharm.
16+
2. Head to **File** &rarr; **Settings** or **PyCharm** &rarr; **Preferences** on a Mac.
17+
![Location of Settings menu option in PyCharm for Windows and Linux]({{ site.baseurl }}/images/content/programming/pycharm_app_menu.png)
18+
3. Select `Project` &rarr; `Python Interpreter` from the list on the left.
19+
4. Click the `+` symbol at the top of the packages list to install a new library.
20+
![PyCharm Interpreter Settings dialog]({{ site.baseurl }}/images/content/programming/pycharm_interpreter_settings.png)
21+
5. Search for `sr.robot3` then click `Install Package`
22+
![Installing sr.robot3 package from within PyCharm]({{ site.baseurl }}/images/content/programming/pycharm_pkgs.png)
23+
If this results in an error, try selecting the `Install to user's site packages directory` checkbox at the bottom of the dialog and try again.
24+
6. All done. You can now close the Settings window.
25+
26+
You should now be able to use code completion and have quick access documentation by pressing <kbd>Ctrl</kbd><kbd>Q</kbd> (or <kbd>⌃</kbd><kbd>J</kbd> on a Mac)

programming/editors/vscode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In order for VSCode to pick up the `sr.robot3` library and offer [completions][c
3131
you'll need to make the library available within the Python environment that you're using.
3232

3333
1. Open the workspace containing your code.
34-
2. Open a terminal via **Terminal** > **New Terminal**.
34+
2. Open a terminal via **Terminal** &rarr; **New Terminal**.
3535
3. Run `pip install sr.robot3`.
3636

3737
[code-completion]: https://en.wikipedia.org/wiki/Autocomplete#In_source_code_editors

simulator/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You may receive a warning about your computer's GPU not being good enough, which
3434
#### Changing your version of Python
3535

3636
If webots is picking up the incorrect version of Python, you'll need to change it.
37-
This can be done using `Tools > Preferences > General > Python command` (or `Webots > Preferences` <kbd>⌘</kbd><kbd>,</kbd> on a Mac).
37+
This can be done using **Tools** &rarr; **Preferences** &rarr; **General** &rarr; **Python command** (or **Webots** &rarr; **Preferences** <kbd>⌘</kbd><kbd>,</kbd> on a Mac).
3838
You'll need to ensure a matching version of Python is installed. If you're still
3939
having problems, ask for help in [`#simulator-help`][simulator-help] in
4040
[Discord][discord].

0 commit comments

Comments
 (0)