Skip to content

Commit 968fd1b

Browse files
authored
Merge pull request #52 from VektrexElectronicSystems/development-sandbox
Development sandbox v1.8.0
2 parents 3a2eaf6 + 706ffdf commit 968fd1b

File tree

2 files changed

+32128
-31964
lines changed

2 files changed

+32128
-31964
lines changed

README.md

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Download and install [Python](https://www.python.org/downloads/), which will ins
2121
- Python Launcher
2222
- Python3 Interpreter
2323

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+
2426
#### Windows Setup
2527

2628
##### 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
3032
It is recommended that the path of Python Interpreter is added for easy usage. There are two ways to add Python to Windows PATH.
3133

3234
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
3436

3537
2. Manually add Python to Windows Path:
3638
- 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
4446
- Navigate to the **scripts** folder (this is the `Python Scripts path`)
4547
- Set the Path **Variable value** to `Python application path;Python Scripts path` (paths are separated by a semicolon)
4648
- 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
4850

4951
#### Mac OS X Setup
5052

@@ -65,7 +67,12 @@ It is recommended that the path of Python Interpreter is added for easy usage. T
6567
### IDEs
6668

6769
#### 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` |
6976

7077
#### Visual Studio Community
7178
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
7481

7582
#### Managing Packages
7683
##### 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` |
7891

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` |
8097

8198
##### 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` |
83106

84107
##### 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>` |
86115

87116
##### 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.
118+
119+
To install this package, run command:
120+
| OS | Command |
121+
| - | - |
122+
| Windows | `py -m pip install spikesafe-python` |
123+
| macOS | `python3 -m pip install spikesafe-python` |
89124

90125
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.
91126

92127
Complete class documentation is available for spikesafe-python in [spikesafe-python API Overview](spikesafe_python_lib_docs).
93128

94129
#### 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` |
96137

97138
#### 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` |
99146

100147
#### 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` |
102155

103156
### General Usage
104157
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,
131184
I'm developing an application using NI-VISA, what is the recommended practice for handling termination characters?<br />
132185
See [Termination Characters in NI-VISA](https://www.ni.com/en-us/support/documentation/supplemental/06/termination-characters-in-ni-visa.html)
133186

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+
134190
## Support/Feedback
135191

136192
If any further assistance is needed beyond the information provided within this repository, email [email protected].

0 commit comments

Comments
 (0)