Skip to content

Commit d9f18af

Browse files
Merge pull request #127 from FrameworkComputer/python-dev-docs
docs: Add details about developing python
2 parents 14eb5df + 9e4830f commit d9f18af

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

python/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,38 @@ Bus 003 Device 078: ID 32ac:0020 Framework Computer Inc LED Matrix Input Module
165165
bcdDevice 0.17
166166
```
167167

168+
## Developing
169+
170+
One time setup
171+
172+
```
173+
# Install dependencies on Ubuntu
174+
sudo apt install python3 python3-tk
175+
176+
# Install dependencies on Fedora
177+
sudo dnf install python3 python3-tkinter
178+
179+
# Create local venv and enter it
180+
python3 -m venv venv
181+
source venv/bin/activate
182+
183+
# Install package into local env
184+
python3 -m pip install -e .
185+
```
186+
187+
Developing
188+
189+
```
190+
# In every new shell, source the virtual environment
191+
source venv/bin/activate
192+
193+
# Launch GUI or commandline
194+
ledmatrixgui
195+
ledmatrixctl
196+
197+
# Launch Python REPL and import the library
198+
# As example, launch the GUI
199+
> python3
200+
>>> from inputmodule import cli
201+
>>> cli.main_gui()
202+
```

0 commit comments

Comments
 (0)