Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79991 > unrolled thread
| Started by | Zachary Ware <zachary.ware+pylist@gmail.com> |
|---|---|
| First post | 2014-10-30 21:30 -0500 |
| Last post | 2014-10-31 14:17 +0000 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: set environmental variable from python Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-10-30 21:30 -0500
Re: set environmental variable from python Rustom Mody <rustompmody@gmail.com> - 2014-10-30 19:36 -0700
Re: set environmental variable from python Artur Bercik <vbubbly21@gmail.com> - 2014-10-31 11:43 +0900
Re: set environmental variable from python "Gisle Vanem" <gvanem@yahoo.no> - 2014-10-31 12:31 +0100
Re: set environmental variable from python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-31 14:17 +0000
| From | Zachary Ware <zachary.ware+pylist@gmail.com> |
|---|---|
| Date | 2014-10-30 21:30 -0500 |
| Subject | Re: set environmental variable from python |
| Message-ID | <mailman.15343.1414722655.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Thursday, October 30, 2014, Artur Bercik <vbubbly21@gmail.com> wrote:
> Dear Dave Angel
>
> Thanks for your answer.
>
> I am using Python 2.7
>
> I want to set it permanently.
> I have to set several variables so it would be easier if I could set them
> from Python.
>
Depending on how "permanently" you mean, about your only solutions would be
"os.system('setx <...>')" or manually manipulating the registry with the
_winreg module.
Hope this helps,
--
Zach
--
Sent from Gmail Mobile
[toc] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-10-30 19:36 -0700 |
| Message-ID | <36c5d2db-a931-417e-ae8c-9c77acfc947b@googlegroups.com> |
| In reply to | #79991 |
On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote:
> On Thursday, October 30, 2014, Artur Bercik <vbub...@gmail.com> wrote:
>
> Dear Dave Angel
>
>
> Thanks for your answer.
>
>
> I am using Python 2.7
>
>
> I want to set it permanently.
> I have to set several variables so it would be easier if I could set them from Python.
>
>
> Depending on how "permanently" you mean, about your only solutions
> would be "os.system('setx <...>')" or manually manipulating the
> registry with the _winreg module.
Or dont do it from python but directly with regedit??
The question really is: Why do you wish to do this from within python?
[toc] | [prev] | [next] | [standalone]
| From | Artur Bercik <vbubbly21@gmail.com> |
|---|---|
| Date | 2014-10-31 11:43 +0900 |
| Message-ID | <mailman.15345.1414723431.18130.python-list@python.org> |
| In reply to | #79992 |
[Multipart message — attachments visible in raw view] — view raw
I have to set several variables so it would be easier if I could set them
from Python.
On Fri, Oct 31, 2014 at 11:36 AM, Rustom Mody <rustompmody@gmail.com> wrote:
> On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote:
> > On Thursday, October 30, 2014, Artur Bercik <vbub...@gmail.com> wrote:
> >
> > Dear Dave Angel
> >
> >
> > Thanks for your answer.
> >
> >
> > I am using Python 2.7
> >
> >
> > I want to set it permanently.
> > I have to set several variables so it would be easier if I could set
> them from Python.
> >
> >
> > Depending on how "permanently" you mean, about your only solutions
> > would be "os.system('setx <...>')" or manually manipulating the
> > registry with the _winreg module.
>
> Or dont do it from python but directly with regedit??
>
> The question really is: Why do you wish to do this from within python?
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
[toc] | [prev] | [next] | [standalone]
| From | "Gisle Vanem" <gvanem@yahoo.no> |
|---|---|
| Date | 2014-10-31 12:31 +0100 |
| Message-ID | <mailman.15349.1414755253.18130.python-list@python.org> |
| In reply to | #79992 |
"Artur Bercik" <vbubbly21@gmail.com> wrote: >I have to set several variables so it would be easier if I could set them > from Python. You can write a Python-script that generates a .bat file (in your %TEMP-dir?). And run this .bat file when Python ends. Put it all in an alias or another .bat file. E.g. untested: alias set_env=python <your-script> -o %TEMP%\set_env.bat & %TEMP%\set_env.bat --gv
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-10-31 14:17 +0000 |
| Message-ID | <mailman.15356.1414765066.18130.python-list@python.org> |
| In reply to | #79992 |
On 31/10/2014 02:36, Rustom Mody wrote:
> On Friday, October 31, 2014 8:01:08 AM UTC+5:30, Zachary Ware wrote:
>> On Thursday, October 30, 2014, Artur Bercik <vbub...@gmail.com> wrote:
>>
>> Dear Dave Angel
>>
>>
>> Thanks for your answer.
>>
>>
>> I am using Python 2.7
>>
>>
>> I want to set it permanently.
>> I have to set several variables so it would be easier if I could set them from Python.
>>
>>
>> Depending on how "permanently" you mean, about your only solutions
>> would be "os.system('setx <...>')" or manually manipulating the
>> registry with the _winreg module.
>
> Or dont do it from python but directly with regedit??
>
> The question really is: Why do you wish to do this from within python?
>
>
Or do it directly with something like the Rapid Environment Editor
http://www.rapidee.com/en/about
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web