Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80018

Re: set environmental variable from python

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'from:addr:yahoo.co.uk': 0.04; 'variables': 0.07; 'friday,': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; 'python': 0.11; '2.7': 0.14; 'language.': 0.14; 'mean,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:skip:e 10': 0.16; 'subject:variable': 0.16; 'subject:python': 0.16; 'thursday,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'python?': 0.22; 'header :User-Agent:1': 0.23; '31,': 0.24; 'environment': 0.24; 'question': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'easier': 0.31; 'subject:from': 0.34; 'could': 0.34; 'something': 0.35; 'editor': 0.35; 'but': 0.35; 'really': 0.36; 'module.': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'dave': 0.60; 'manually': 0.60; 'url:about': 0.61; 'our': 0.64; 'dear': 0.65; '30,': 0.65; 'charset:windows-1252': 0.65; 'within': 0.65; 'dont': 0.67; 'answer.': 0.68; 'wish': 0.70; '2014,': 0.84; 'permanently.': 0.84; 'received:btcentralplus.com': 0.84; 'angel': 0.91; 'received:86': 0.91; 'ware': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: set environmental variable from python
Date Fri, 31 Oct 2014 14:17:33 +0000
References <CA+F4vi=3g_y-N7qrAyuTArj5kKXVzXhe8W+tfWQVcA2OjGUfpQ@mail.gmail.com> <5452EAE2.8020500@davea.name> <CA+F4vi=vXj4Ge+_69YwiNpn11gbSBmdgyouC2Z5wUpWxKPxuYQ@mail.gmail.com> <mailman.15343.1414722655.18130.python-list@python.org> <36c5d2db-a931-417e-ae8c-9c77acfc947b@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host host86-178-21-119.range86-178.btcentralplus.com
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
In-Reply-To <36c5d2db-a931-417e-ae8c-9c77acfc947b@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15356.1414765066.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1414765066 news.xs4all.nl 2959 [2001:888:2000:d::a6]:51332
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80018

Show key headers only | View raw


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

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web