Skip to content

Commit

Permalink
Fix the examples folder
Browse files Browse the repository at this point in the history
  • Loading branch information
delfick committed Dec 26, 2024
1 parent 03764d4 commit 6bbf741
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
6 changes: 3 additions & 3 deletions examples/.python
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ ! -e $DIR/.lifx ]]; then
echo "Please run ./setup_venv first"
if [[ ! -e $DIR/../.venv ]]; then
echo "Please run 'source ../dev activate' first"
exit 1
fi

if [[ -z $LIFX_CONFIG ]]; then
export LIFX_CONFIG=$DIR/lifx.yml
fi

exec $DIR/.lifx/bin/python "$@"
exec "$DIR/../.venv/bin/python" "$@"
4 changes: 2 additions & 2 deletions examples/README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Examples
========

To run these scripts first run ``./setup_venv``
To run these scripts first run ``source ../dev activate``

Then just run the scripts.

For example, to cycle a rainbow over your lights::

$ ./cycle_rainbow.py

Unless you're on windows, in which case ``./setup_venv`` won't work. On windows
Unless you're on windows, in which case ``source ../dev activate`` won't work. On windows
make you're own virtualenv and ``pip install photons-core`` in it, or
``pip install -e .`` from the ``photons-core`` directory and then run the scripts
with ``python``. i.e. ``python find``.
21 changes: 0 additions & 21 deletions examples/setup_venv

This file was deleted.

0 comments on commit 6bbf741

Please sign in to comment.