Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'sys': 0.07; 'name?': 0.09; 'subject:set': 0.09; 'windows': 0.15; 'subject:skip:e 10': 0.16; 'subject:variable': 0.16; 'subject:python': 0.16; 'variable': 0.18; 'advance.': 0.19; 'value.': 0.19; 'import': 0.22; 'python?': 0.22; 'to:name:python-list@python.org': 0.22; 'message- id:@mail.gmail.com': 0.30; 'subject:from': 0.34; 'skip:s 30': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'possible': 0.36; 'follows:': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'name:': 0.61; 'name': 0.63; 'received:mail-ob0-x22f.google.com': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=UGKUZf0JQxgDp2dsm4VwayblfzHwCzGX2D5vOwk3Jio=; b=IUE10qnxzg0XtVdrVfEflcNioZV3u1NKrlPuG5M77cnjsLmN0xXHJ00BhobUZtT2eF GboYiXD0Otcr/TTr5gzMSQgTuIz8/kuLdh2YMWnwoI5rGbkSBd0VFsfbuphdp9bio21m w1suivCOdzdsOYDgyRowCffjRdQqPV7ofqwSdqTFxTfJ6xha4+ICuc3H8uE2ddObO2Jm N9+a9JfLo6pIH9BzzGxpm/qu2EwVeUCUklWyDdrO8U1azD0RmN7JP+Nhq5/CSniyGB3c 1ZIuefNPxC5U8Kz8JFDaiyf7JhwpH+0qmldvz0esPtdZnGKxHpNEX+AMQyvyNnSFwzEt Bi1g== X-Received: by 10.60.157.100 with SMTP id wl4mr17498734oeb.37.1414718586030; Thu, 30 Oct 2014 18:23:06 -0700 (PDT) MIME-Version: 1.0 From: Artur Bercik Date: Fri, 31 Oct 2014 10:22:45 +0900 Subject: set environmental variable from python To: "python-list@python.org" Content-Type: multipart/alternative; boundary=089e01182fd0c7128d0506add618 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414718595 news.xs4all.nl 2862 [2001:888:2000:d::a6]:36977 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79984 --089e01182fd0c7128d0506add618 Content-Type: text/plain; charset=UTF-8 I have to set environmental variable in my windows PC as follows: variable name: GISBASE value: C:\GRASS-64 Is it possible to set it from python? import sys sys.path.append("C:\\GRASS-64") But how to give variable name? I have to set both the variable name and value. Thanks in the advance. Artur --089e01182fd0c7128d0506add618 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have to set environmental variable in my windows PC as f= ollows:

variable name: GISBASE

value: C:\GRASS-64

Is i= t possible to set it from python?

import sys

sys.path.append(= "C:\\GRASS-64")

But how to give variable name? I have to s= et both the variable name and value.

Thanks in the advan= ce.

Artur
--089e01182fd0c7128d0506add618--