Skip to content

winpython.ini (changing environment variables) #266

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

Closed
traits opened this issue Feb 26, 2016 · 9 comments
Closed

winpython.ini (changing environment variables) #266

traits opened this issue Feb 26, 2016 · 9 comments

Comments

@traits
Copy link

traits commented Feb 26, 2016

There is some documentation at https://sourceforge.net/p/winpython/wiki/Environment/ regarding overwriting environment variables.

I'm the only one, missing the syntax for appending/modifying an existing variable? For PATH as a salient example, this is the much more likely scenario. Not sure, if this is a documentation glitch or something currently not possible. Could someone clarify?

@stonebig
Copy link
Contributor

[debug]
state = disabled

[environment]
## <?> Uncomment lines to override environment variables
PATH = my_lovely_path
#PYTHONPATH = 
#PYTHONSTARTUP = 

@traits
Copy link
Author

traits commented Feb 26, 2016

It seems, I 'm missing something obvious. This is overwriting - what I mean is the syntax for appending (for example: what a windows shell with "set PATH=%PATH%;my_lovely_path" does). Supports this ini file the concept of variable expanding?

@stonebig
Copy link
Contributor

no. if you are expert in NSIS scripting, the code is apparently there https://github.com/winpython/winpython/blob/master/portable/launcher.nsi (line 206 to 216)

@stonebig
Copy link
Contributor

the Winpython.ini doesn't support expanding, but the new 'student' method would do for you #262 (comment)

(or see todays builds with #268)

Just use the '(student)' icons and change what you don't like in "env_for_student.bat"

@stonebig
Copy link
Contributor

I could try complexify further the nsis scripts, but I'm now rather going on the opposite route:

  • there is too much complexity in WinPython due to this 'intermediate' technology,
  • I whish to reduce it to the minimum and move the logic part to Windows or Python scripts.

@stonebig stonebig added this to the 2016-02 Matplotlib 2.0.0 / Pandas 0.18 milestone Feb 28, 2016
@traits
Copy link
Author

traits commented Feb 29, 2016

I was hoping to exploit the changed PATH w/o using any batch file or similar (in my case to locate some CUDA tools for theano, but this has been solved by utilizing .theanorc).
In the long run though, I agree - the KISS approach is very likely the better choice.

@stonebig
Copy link
Contributor

ok. I keep the issue open as I try to rework and simplify this part, yet making it more flexible.

@stonebig
Copy link
Contributor

stonebig commented Mar 5, 2016

The new configuration and icon system works with winpython.ini like that:
""""
[debug]
state = disabled
[environment]
PATH = %PATH%;my_lovely_cuda;
""""
(if all goes well and changes made do work on windows 10 too)

@stonebig
Copy link
Contributor

stonebig commented Mar 5, 2016

solved by #272

@stonebig stonebig closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants