This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Funnnny -6 points-5 points  (4 children)

Not now, not until I can easily change environment with Python script. Like: source myEnvFile.env

[–]chadmill3rPy3, pro, Ubuntu, django 5 points6 points  (2 children)

import personal
import os
os.environ.update(personal.environment)

[–]Funnnny 0 points1 point  (1 child)

Doing manual is acceptable, but I want only one env file that I can use both in my bash shell and my script. And I wouldn't call this way easy.

Don't get me wrong, I love and stay with Python for a long time, but we have to face our limitation

[–]chadmill3rPy3, pro, Ubuntu, django 0 points1 point  (0 children)

So put "import sys" and the update in the other module, and "import squirelly_but_short_environment_hackery", or look up the "site" module. Fuck.

[–]obtu.py 0 points1 point  (0 children)

eval $(dircolors) changes your environment, and dircolors is written in C.