ipython / ipython/ipython

Wishlist: add a `--env` option to `%%script` to set environment variables

Abierto
#4,472 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
16.8k
Forks
4.5k
Merge medio
1 d 2 h
PR fusionados (30 d)
6

Descripción

It would be nice to be able to set environment variables when invoking an external program/script. It can currently be done with command line games, eg: on most linux flavours you could do:

```
%%script env myScriptVar=someValue ruby
...
```

but it would seem more natural for the capability to be in `%%script`, not the least because it could be platform agnostic.

One potential approach would be to allow arbitrary `Popen` args (as a dict perhaps?).

ps: the `env` command also allows unsetting environment variables - another useful option, but perhaps less important..

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.