You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/13-ides.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -695,20 +695,13 @@ This functionality in VS Code is available from the Source Control view (from th
695
695
696
696
### Running Code from IDE
697
697
698
-
We have configured our environment and explored some of the most commonly used IDE features
699
-
and are now ready to run our Python script from the IDE.
698
+
We have configured our environment and explored some of the most commonly used IDE features and are now ready to run our Python script from the IDE.
700
699
701
-
Running code using the graphical interface of an IDE provides a simple, user-friendly way to execute
702
-
programs with just a click, reducing the need type commands manually in the command line terminal.
703
-
On the other hand, running code from a terminal window in an IDE offers the flexibility and control
704
-
of the command line — both approaches complement each other by supporting different user preferences
705
-
and tasks within the same unified environment.
700
+
Running code using the graphical interface of an IDE provides a simple, user-friendly way to execute programs with just a click, reducing the need type commands manually in the command line terminal.
701
+
On the other hand, running code from a terminal window in an IDE offers the flexibility and control of the command line — both approaches complement each other by supporting different user preferences and tasks within the same unified environment.
706
702
707
-
In this lesson, we prioritise using the command line and typing commands whenever possible,
708
-
as these skills are easily transferable across different IDEs (with a note that you should feel free to use other equivalent
709
-
ways for doing things that suit you more). However, for tasks like debugging -
710
-
where the graphical interface offers significant advantages — we will make use of the IDE’s built-in
711
-
visual tools.
703
+
In this lesson, we prioritise using the command line and typing commands whenever possible, as these skills are easily transferable across different IDEs (with a note that you should feel free to use other equivalent ways for doing things that suit you more).
704
+
However, for tasks like debugging - where the graphical interface offers significant advantages — we will make use of the IDE’s built-in visual tools.
712
705
713
706
::::::::::::::::::::::::::::::::: group-tab
714
707
@@ -720,7 +713,18 @@ and select `Run 'inflammation analysis'` (i.e. the Run Configuration we created
720
713
721
714
{alt='Running a script from PyCharm' .image-with-shadow width="800px" }
722
715
723
-
The script will run in a terminal window at the bottom of the IDE window and display something like:
716
+
717
+
### VS Code
718
+
719
+
To run our script using the VS Code's graphical interface, make sure the `inflammation-analysis.py` file
720
+
is selected in the project/file view on the left, then click the ">" (play) button in the top right corner.
721
+
722
+
{alt='Running a script from PyCharm' .image-with-shadow width="800px" }
723
+
724
+
:::::::::::::::::::::::::::::::::
725
+
726
+
The new terminal window will open at the bottom of the IDE window (or could be on the side - depending on how panes are split in your IDE),
727
+
the script will be run inside it and the result will be displayed as:
@@ -730,26 +734,22 @@ inflammation-analysis.py: error: the following arguments are required: infiles
730
734
Process finished with exit code 2
731
735
```
732
736
733
-
This is the same error we got when running the script from the command line.
734
-
We will get back to this error shortly -
735
-
for now, the good thing is that we managed to set up our project for development
736
-
both from the command line and PyCharm and are getting the same outputs.
737
-
Before we move on to fixing errors and writing more code,
738
-
Let us have a look at the last set of tools for collaborative code development
739
-
which we will be using in this course - Git and GitHub.
740
-
741
-
:::::::::::::::::::::::::::::::::
737
+
This is the same error we got when running the script from the command line! Essentially what happened was the IDE opened a command line terminal within its interface
738
+
and executed the Python command to run the script for us (`python3 inflammation-analysis.py`) - saving us some typing.
739
+
You can carry on to run the Python script in whatever way you find more convenient - some developers prefer to type the commands in a terminal manually as that gives
740
+
the feel of having more control over what is happening and what commands are being executed.
742
741
742
+
We will get back to the above error shortly - for now, the good thing is that we managed to set up our project for development both from the command line and IDE and are getting the same outputs.
743
+
Before we move on to fixing errors and writing more code, let us have a look at the last set of tools for collaborative code development which we will be using in this course - Git and GitHub.
- An IDE is an application that provides a comprehensive set of facilities for software development, including syntax highlighting, code search and completion, version control, testing and debugging.
753
-
- PyCharm recognises virtual environments configured from the command line using `venv` and `pip`.
753
+
-IDEs like PyCharm and VS Code recognise virtual environments configured from the command line using `venv` and `pip`.
0 commit comments