New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of PYTHONSTARTUP environment variable #235
base: master
Are you sure you want to change the base?
Support of PYTHONSTARTUP environment variable #235
Conversation
When creating the python interpreter, it will load PYTHONSTARTUP if available Make variable name explicit Delete variable Use "with" statement Delete _f after 'with' block
Squashed commits from #233 |
Can you add a test and an entry in |
For adding a test, look in the |
Thanks for the info. Actually, after testing the feature and using it, I am not sure it is a good idea to load PYTHONSTARTUP within the python interpreter generated. I think adding a parameter to explicitely allow the use of PYTHONSTARTUP may be a better idea. What do you think ? |
@paschembri I agree with your last comment and proposal. |
(Note: I haven't used PYTHONSTARTUP myself, so I'm mostly brainstorming here). There might still be a mismatch between PYTHONSTARTUP (something individual users might want, and then they want it for all their buildouts) and the buildout config (which is used by multiple users, and not every one of them uses PYTHONSTARTUP in a buildout-compatible way). So switching on the option in a buildout enables it for all the users. You rather want to enable it per user and not per buildout. Would it help to document it as something you'd generally want to enable (or disable) in |
OK, let's do that. |
After digging into the source files, adding an option to generate the python interpreter script requires the The script function signature would be changed from
to
Other internal functions may be changed but with minor modifications. Finally, using the 'initialization' variable is too limited to do something clean (no indentation possible !). |
b8ad13b
to
5db2e99
Compare
When creating the python interpreter, it will load PYTHONSTARTUP if available