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


Groups > comp.lang.python > #79994

Re: set environmental variable from python

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <vbubbly21@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'python.': 0.02; 'variables': 0.07; 'friday,': 0.09; 'subject:set': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '2.7': 0.14; 'mean,': 0.16; 'subject:skip:e 10': 0.16; 'subject:variable': 0.16; 'subject:python': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'email addr:gmail.com&gt;': 0.22; 'python?': 0.22; 'cc:addr:python.org': 0.22; '31,': 0.24; 'question': 0.24; 'cc:2**0': 0.24; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'easier': 0.31; 'url:python': 0.33; 'fri,': 0.33; 'subject:from': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'module.': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'skip:& 10': 0.38; 'skip:& 20': 0.39; 'url:mail': 0.40; 'how': 0.40; 'dave': 0.60; 'manually': 0.60; 'dear': 0.65; '30,': 0.65; 'to:addr:gmail.com': 0.65; 'within': 0.65; 'dont': 0.67; 'answer.': 0.68; 'wish': 0.70; '2014,': 0.84; 'permanently.': 0.84; 'angel': 0.91; 'ware': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pki+kLKtpd4yoqXC2C1Q6KcxEvOcXELSonOwj7/uq+w=; b=HKdIv9nKJ9Od5Y5OI9BUJ9raX0yjSav1Jfd4ohvjakm9CsWsL4EQx3mr14efOj0YzF 2DJhBHdpt/pIpARY23GGxJaaT4itBc/C7KErU8qgvIhsqu9YoOmO49O1oDAB07I7Rj+i KwwajWVuz0rQ9ZALHvBhSVnOTvx7AH08FbXFA/0RVmOnDISxBJEhTqCxh7tpbyZizJEb 5KpkzRv16NVv/bubrYE0DbqbTzsEd+E3SIxFeq+5PaOCP9RqNAnWidMCiR935NbavrY8 t6GUkQFY1zJfixDism23+zionjR9nFcAuZknvuaS11/bhfOhry+aTgrf8ys4tEVzwzP9 yL1A==
X-Received by 10.202.49.21 with SMTP id x21mr13525837oix.17.1414723421235; Thu, 30 Oct 2014 19:43:41 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <36c5d2db-a931-417e-ae8c-9c77acfc947b@googlegroups.com>
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>
From Artur Bercik <vbubbly21@gmail.com>
Date Fri, 31 Oct 2014 11:43:21 +0900
Subject Re: set environmental variable from python
To Rustom Mody <rustompmody@gmail.com>
Content-Type multipart/alternative; boundary=001a113cdef6fa71f40506aef6ba
Cc "python-list@python.org" <python-list@python.org>
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.15345.1414723431.18130.python-list@python.org> (permalink)
Lines 84
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1414723431 news.xs4all.nl 2852 [2001:888:2000:d::a6]:40600
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:79994

Show key headers only | View raw


[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
>

Back to comp.lang.python | Previous | Next — Previous in thread | Next 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