Python: Difference between revisions
imported>Tobias.bora Add example with buildPythonApplication |
imported>Tobias.bora mNo edit summary |
||
| Line 92: | Line 92: | ||
We can now build with: | We can now build with: | ||
< | <syntaxhighlight> | ||
$ nix-build | $ nix-build | ||
[...] | [...] | ||
| Line 98: | Line 98: | ||
* Serving Flask app ".web_interface" (lazy loading) | * Serving Flask app ".web_interface" (lazy loading) | ||
[...] | [...] | ||
</ | </syntaxhighlight> | ||
or just enter a nix-shell if it's easier to develop: | or just enter a nix-shell, and directly execute your program or python if it's easier to develop: | ||
< | <syntaxhighlight> | ||
$ nix-shell | $ nix-shell | ||
[...] | [...] | ||
| Line 107: | Line 107: | ||
* Serving Flask app "web_interface" (lazy loading) | * Serving Flask app "web_interface" (lazy loading) | ||
[...] | [...] | ||
[nix-shell]$ python | [nix-shell]$ python | ||
Python 3.8.7 (default, Dec 21 2020, 17:18:55) | Python 3.8.7 (default, Dec 21 2020, 17:18:55) | ||
| Line 113: | Line 114: | ||
>>> import flask | >>> import flask | ||
>>> | >>> | ||
</ | </syntaxhighlight> | ||
=== Python virtual environment === | === Python virtual environment === | ||