From: Vivien Maisonneuve Date: Wed, 25 Jun 2014 16:11:07 +0000 (+0200) Subject: README on how to run examples X-Git-Tag: 1.0~201 X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/commitdiff_plain/2f52000b10526dd214e0e4d51e019f1619fe99ba?ds=sidebyside;hp=de9c32ed9f08a0a776017829ef2f3476a5bd8bb2 README on how to run examples --- diff --git a/examples/README.rst b/examples/README.rst new file mode 100644 index 0000000..9c76280 --- /dev/null +++ b/examples/README.rst @@ -0,0 +1,17 @@ + +======== +Examples +======== + +This directory contains pypol examples programs. + +Running Examples +================ + +To run the individual examples one needs to have Python version ≥ 3.4 installed and pypol must be in your ``PYTHONPATH`` environment variable. +Most examples can be run from the command line ``python3`` and the name of the example:: + + vivien@bardo:~/pypol/examples$ export PYTHONPATH=$PWD/..:$PYTHONPATH + vivien@bardo:~/pypol/examples$ python3 squares.py + +Note: on most systems, the current directory is searched by Python automatically, so ``python3 examples/squares.py`` works from the pypol root directory, however there are systems (Ubuntu Intrepid) where this doesn't work by default, unless you put ``PYTHONPATH=.`` into your .bashrc for example.