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: README.md
+62-11Lines changed: 62 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ To open Command Prompt press the key combination Windows + R to open a Run dialo
32
32
It is recommended that the path of Python Interpreter is added for easy usage. There are two ways to add Python to Windows PATH.
33
33
34
34
1. During Python installation check the box Add Python to PATH when prompted.
35
-
- Confirm Python PATH is set in **Command Prompt** by typing `python3 --version` to verify the Python version
35
+
- Confirm Python PATH is set in **Command Prompt** by typing `py --version` to verify the Python version
36
36
37
37
2. Manually add Python to Windows Path:
38
38
- Press the key combination **Windows + R** to open a Run dialog
@@ -46,7 +46,7 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
46
46
- Navigate to the **scripts** folder (this is the `Python Scripts path`)
47
47
- Set the Path **Variable value** to `Python application path;Python Scripts path` (paths are separated by a semicolon)
48
48
- Press **OK**
49
-
- Confirm Python PATH is set in **Command Prompt** by typing `python3 --version` to verify the Python version
49
+
- Confirm Python PATH is set in **Command Prompt** by typing `py --version` to verify the Python version
50
50
51
51
#### Mac OS X Setup
52
52
@@ -67,7 +67,12 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
67
67
### IDEs
68
68
69
69
#### Visual Studio Code and Using a Virtual Environment
70
-
To run these sequences a light-weight IDE, or to target cross-platform development, use the free [Visual Studio Code](https://code.visualstudio.com/). See [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial) to simply setup your IDE with Python. Optionally, using a [virtual environment](https://docs.python.org/3/tutorial/venv.html) is recommended to successfully meet the installation requirements to run these sequences. Using the commands `python3 -m venv .venv` followed by `.venv\scripts\activate` is a simple way to setup your virtual environment. After your IDE and virtual environment is setup, continue to install the remaining Python packages below.
70
+
To run these sequences a light-weight IDE, or to target cross-platform development, use the free [Visual Studio Code](https://code.visualstudio.com/). See [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial) to simply setup your IDE with Python. Optionally, using a [virtual environment](https://docs.python.org/3/tutorial/venv.html) is recommended to successfully meet the installation requirements to run these sequences. To setup your virtual environment run the follow commands and then continue to install the remaining Python packages later in this document:
71
+
72
+
| OS | Command |
73
+
| - | - |
74
+
| Windows |`py -m venv .venv` followed by `.venv\scripts\activate`|
75
+
| macOS |`python3 -m venv .venv` followed by `.venv\scripts\activate`|
71
76
72
77
#### Visual Studio Community
73
78
To run these sequences in a more feature rich IDE, use the free [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/). See [Python In Visual Studio](https://docs.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-00-installation?view=vs-2022) to simply setup your IDE with Python. Optionall, using a [virtual environment](https://docs.microsoft.com/en-us/visualstudio/python/managing-python-environments-in-visual-studio?view=vs-2022) is recommended to successfully meet the installation requirements to run these sequences.
@@ -76,31 +81,77 @@ To run these sequences in a more feature rich IDE, use the free [Visual Studio C
76
81
77
82
#### Managing Packages
78
83
##### How to Install/Upgraded Packages
79
-
Installing packages use pip. It is recommended that pip be updated to latest version `python3 -m pip install --upgrade pip`
84
+
Installing packages use pip. It is recommended that pip be updated to latest version.
85
+
86
+
To install/upgrade pip, run command:
87
+
| OS | Command |
88
+
| - | - |
89
+
| Windows |`py -m pip install --upgrade pip`|
90
+
| macOS |`python3 -m pip install --upgrade pip`|
80
91
81
-
The version of pip can be displayed with the following command `pip3 -V`
92
+
To display the version of pip, run command:
93
+
| OS | Command |
94
+
| - | - |
95
+
| Windows |`pip -V`|
96
+
| macOS |`pip3 -V`|
82
97
83
98
##### How to View All Installed Packages
84
-
A list of all installed packages can be found with `pip3 freeze` command
99
+
A list of all installed packages can be displayed.
100
+
101
+
To view all installed packages, run command:
102
+
| OS | Command |
103
+
| - | - |
104
+
| Windows |`pip freeze`|
105
+
| macOS |`pip3 freeze`|
85
106
86
107
##### How to View Details of an Installed Package
87
-
After a package is installed the details of a package can be displayed with the following command `pip3 show <package name>` (e.g. `pip3 show spikesafe-python`)
108
+
After a package is installed the details of a package can be displayed.
109
+
110
+
To view details of a package, run command:
111
+
| OS | Command |
112
+
| - | - |
113
+
| Windows |`pip show <package name>`|
114
+
| macOS |`pip3 show <package name>`|
88
115
89
116
##### Installing spikesafe-python Package
90
-
The [spikesafe-python](https://pypi.org/project/spikesafe-python/) library will need to be installed using the command `python3 -m pip install spikesafe-python`. Vektrex recommends always having the latest version of spikesafe-python when running these sequences; the current version is 1.2.3.
117
+
The [spikesafe-python](https://pypi.org/project/spikesafe-python/) library will need to be installed. Vektrex recommends always having the latest version of spikesafe-python when running these sequences; the current version is 1.3.0.
Once the spikesafe-python package is installed, each script in this repository can be run independently as a standalone Python file. Run a file in its current state and verify that the expected outputs are obtained, as specified by the file's markdown description.
93
126
94
127
Complete class documentation is available for spikesafe-python in [spikesafe-python API Overview](spikesafe_python_lib_docs).
95
128
96
129
#### Installing matplotlib Package
97
-
Some sequences involve graphing measurement results. To properly graph results, the [matplotlib](https://matplotlib.org/) library is required (version 3.2.1 or greater). Use the command `python3 -m pip install matplotlib` to install the latest version of matplotlib. Once the matplotlib library is installed, each sequence that involves graphing can be run as a standalone Python file.
130
+
Some sequences involve graphing measurement results. To properly graph results, the [matplotlib](https://matplotlib.org/) library is required (version 3.2.1 or greater). Once the matplotlib library is installed, each sequence that involves graphing can be run as a standalone Python file.
131
+
132
+
To install this package, run command:
133
+
| OS | Command |
134
+
| - | - |
135
+
| Windows |`py -m pip install matplotlib`|
136
+
| macOS |`python3 -m pip install matplotlib`|
98
137
99
138
#### Installing PyCLibrary Package
100
-
Some sequences require external C resources, and requires the [PyCLibrary](https://pyclibrary.readthedocs.io/en/latest/) library. To install this library, enter the command `python3 -m pip install pyclibrary`. Once the PyCLibrary library is installed, each sequence that involves external C resources can be run as a standalone Python file.
139
+
Some sequences require external C resources, and requires the [PyCLibrary](https://pyclibrary.readthedocs.io/en/latest/) library. Once the PyCLibrary library is installed, each sequence that involves external C resources can be run as a standalone Python file.
140
+
141
+
To install this package, run command:
142
+
| OS | Command |
143
+
| - | - |
144
+
| Windows |`py -m pip install pyclibrary`|
145
+
| macOS |`python3 -m pip install pyclibrary`|
101
146
102
147
#### Installing pyserial Package
103
-
Some sequences involve connecting to a serial interface instrument and requires the [pyserial](https://pypi.org/project/pyserial/) library (version 3.5 or greater). Use the command `python3 -m pip install pyserial` to install the latest version of pyserial. Once the pyserial library is installed, each sequence that involves a serial interface can be run as a standalone Python file.
148
+
Some sequences involve connecting to a serial interface instrument and requires the [pyserial](https://pypi.org/project/pyserial/) library (version 3.5 or greater). Once the pyserial library is installed, each sequence that involves a serial interface can be run as a standalone Python file.
149
+
150
+
To install this package, run command:
151
+
| OS | Command |
152
+
| - | - |
153
+
| Windows |`py -m pip install pyserial`|
154
+
| macOS |`python3 -m pip install pyserial`|
104
155
105
156
### General Usage
106
157
For most examples, you may need to modify the specified IP address within a sequence to match the IP address that is physically set on your SpikeSafe's DIP switch. In each sequence, the default IP address of 10.0.0.220 is set in the line `ip_address = '10.0.0.220'`.
0 commit comments