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
+67-11Lines changed: 67 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ Download and install [Python](https://www.python.org/downloads/), which will ins
21
21
- Python Launcher
22
22
- Python3 Interpreter
23
23
24
+
It is recommended to use a version of Python with the status key of bugfix or higher, see [Python Release Cycle](https://devguide.python.org/versions/#versions).
25
+
24
26
#### Windows Setup
25
27
26
28
##### Use the Standard Console Command Prompt
@@ -30,7 +32,7 @@ To open Command Prompt press the key combination Windows + R to open a Run dialo
30
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.
31
33
32
34
1. During Python installation check the box Add Python to PATH when prompted.
33
-
- 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
34
36
35
37
2. Manually add Python to Windows Path:
36
38
- Press the key combination **Windows + R** to open a Run dialog
@@ -44,7 +46,7 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
44
46
- Navigate to the **scripts** folder (this is the `Python Scripts path`)
45
47
- Set the Path **Variable value** to `Python application path;Python Scripts path` (paths are separated by a semicolon)
46
48
- Press **OK**
47
-
- 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
48
50
49
51
#### Mac OS X Setup
50
52
@@ -65,7 +67,12 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
65
67
### IDEs
66
68
67
69
#### Visual Studio Code and Using a Virtual Environment
68
-
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`|
69
76
70
77
#### Visual Studio Community
71
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.
@@ -74,31 +81,77 @@ To run these sequences in a more feature rich IDE, use the free [Visual Studio C
74
81
75
82
#### Managing Packages
76
83
##### How to Install/Upgraded Packages
77
-
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`|
78
91
79
-
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`|
80
97
81
98
##### How to View All Installed Packages
82
-
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`|
83
106
84
107
##### How to View Details of an Installed Package
85
-
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>`|
86
115
87
116
##### Installing spikesafe-python Package
88
-
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.
91
126
92
127
Complete class documentation is available for spikesafe-python in [spikesafe-python API Overview](spikesafe_python_lib_docs).
93
128
94
129
#### Installing matplotlib Package
95
-
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`|
96
137
97
138
#### Installing PyCLibrary Package
98
-
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`|
99
146
100
147
#### Installing pyserial Package
101
-
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`|
102
155
103
156
### General Usage
104
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'`.
@@ -131,6 +184,9 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
131
184
I'm developing an application using NI-VISA, what is the recommended practice for handling termination characters?<br />
132
185
See [Termination Characters in NI-VISA](https://www.ni.com/en-us/support/documentation/supplemental/06/termination-characters-in-ni-visa.html)
133
186
187
+
I'm developing an application using MATLAB, how do I get started?<br />
188
+
See [System Requirements for MATLAB Engine API for Python](https://www.mathworks.com/help/matlab/matlab_external/system-requirements-for-matlab-engine-for-python.html) to ensure your system can support Python. Then see [Call Python from MATLAB](https://www.mathworks.com/help/matlab/call-python-libraries.html) on how to access Python libraries in MATLAB.
189
+
134
190
## Support/Feedback
135
191
136
192
If any further assistance is needed beyond the information provided within this repository, email [email protected].
0 commit comments