Skip to content

Commit 789e3b4

Browse files
Anton VanhouckeAnton Vanhoucke
authored andcommitted
More better highlighting and image fix
1 parent d05dc7d commit 789e3b4

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

docs/tutorials/python-development-environment.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,25 @@ Next we need a versioning system. That's a tool for tracking changes you made to
7272
git config --global user.name "Your Name"
7373

7474
Now let's make a new project using our versioning system. Just type:
75-
``` sh
76-
mkdir myproject
77-
cd myproject/
78-
git init
79-
```
75+
76+
mkdir myproject
77+
cd myproject/
78+
git init
8079

8180
Yay! We have a new project. It's empty though. So let's add some code. Start a text editor like this:
8281
`nano run_motor.py`
8382

8483

8584
Now add the following code:
86-
``` py
85+
~~~ py
8786
from ev3dev.brickpi import OUTPUT_A, Motor #Replace brickpi with ev3 if you use that.
8887
import time
8988

9089
m = Motor(OUTPUT_A)
9190
m.run_forever(duty_cycle_sp = 100)
9291
time.sleep(1)
9392
m.stop()
94-
```
93+
~~~
9594

9695
Press ctrl-X and `y` to save. It's time to let the first motor run. Plug it into port A on your brick and go: `python run_motor.py`. Tataaa! The motor is running full power for a second.
9796

@@ -101,16 +100,12 @@ What we are going to do now is make a clone of our project on the ev3dev machine
101100
In the Welcome dialog choose: 'Checkout from version control' > 'Git'
102101
Now type the hostname of the ev3dev machine, followed by a semicolon the projectname. In the other fields choose a nice parent and project directory.
103102

104-
{% include screenshot.html source="/images/osx/PyCharm/welcome.png" %}
105-
106-
Now you can continue where you left of on the ev3dev machine, but with a larger screen, better keyboard and more tools! There is one problem, though: PyCharm puts red curly lines under the ev3dev library. {% include screenshot.html source="/images/osx/PyCharm/missing-lib.png" %} It doesn't recognise it. And that's logical, because it's missing on the development machine. If we install it we won't be able to run motors, but the documentation and autocomplete will be active. So on your development machine start a terminal and do:
107-
108-
``` bash
109-
git clone https://github.com/rhempel/ev3dev-lang-python.git
110-
cd ev3dev-lang-python/
103+
{% include inline-screenshot.html source="/images/osx/PyCharm/welcome.png" caption="The 'Welcome' dialog in PyCharm"%}
111104

112-
python setup.py install
113-
cd .. # Optional
114-
rm -r ev3dev-lang-python/ # Optional to remove the downloaded files. It's installed now anyway.
105+
Now you can continue where you left of on the ev3dev machine, but with a larger screen, better keyboard and more tools! There is one problem, though: PyCharm puts red curly lines under the ev3dev library. {% include inline-screenshot.html source="/images/osx/PyCharm/missing-lib.png" caption="Grrr. Those curly red lines. Fix them!" %} It doesn't recognise it. And that's logical, because it's missing on the development machine. If we install it we won't be able to run motors, but the documentation and autocomplete will be active. So on your development machine start a terminal and do:
115106

116-
```
107+
git clone https://github.com/rhempel/ev3dev-lang-python.git
108+
cd ev3dev-lang-python/
109+
python setup.py install
110+
cd .. # Optional
111+
rm -r ev3dev-lang-python/ # Optional to remove the downloaded files. It's installed now anyway.

0 commit comments

Comments
 (0)