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


Groups > comp.lang.python > #30593

Re: parse an environment file

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'bash': 0.07; 'subject:file': 0.07; 'variables.': 0.07; 'python': 0.09; 'received:mail-vc0-f174.google.com': 0.09; 'script,': 0.09; 'entries,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'instance:': 0.16; 'oct': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'variables': 0.17; '(usually': 0.22; 'are.': 0.22; 'produces': 0.22; 'header:In-Reply-To:1': 0.25; 'common': 0.26; 'wondering': 0.26; 'am,': 0.27; 'environment.': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'environment': 0.29; 'received:209.85.220.174': 0.29; "i'm": 0.29; 'asking': 0.32; "aren't": 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'jason': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'ones': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'most': 0.61; 'bring': 0.62; '100': 0.78; 'url:search': 0.83; '10:11': 0.84; 'about,': 0.84; 'ball,': 0.84; 'url:variables': 0.84; 'results,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=D0FOEHvrfg69JxBIuAefehcBzNGhM7G5Hui72RDEHKI=; b=ssaGGS4dISo50w6TbDvjggdnUCQ2jJ4ERs/jaNGcr+quD6w7UVtjzzctjgmXY1vxqh /Od/DnyL4TrBkczsShOZkhSbRmSzoF23TYDhnRZvCZnvhP94vls50pJEqYkhSchBNJU+ B2R+AA0I8WsrYzCPqmhjfpNd9Ob5hgo28uSCf6NvSnqEp95o1S5qPSU1DeXtKOGFYErC eK1pKOuse3NHAGUDS1qLqQPuKI+5gVQuhi7C207AW/O266Vwk0fxNXkxf6VgtrWyOTZD Ni+izHDrVrZRGLFJwfrcl4j7MnsMQHLhIxs0pPd2Pq6Pl3ap4bn1mpojv2ySVkK5E13Z WO1Q==
MIME-Version 1.0
In-Reply-To <CANy1k1i7XA3pTGeZeWk8V4osPkRoWxkSQJehhix9nHzDzO3HTg@mail.gmail.com>
References <CANy1k1i7XA3pTGeZeWk8V4osPkRoWxkSQJehhix9nHzDzO3HTg@mail.gmail.com>
Date Mon, 1 Oct 2012 14:20:55 +1000
Subject Re: parse an environment file
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1697.1349065258.27098.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1349065258 news.xs4all.nl 6862 [2001:888:2000:d::a6]:48119
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30593

Show key headers only | View raw


On Mon, Oct 1, 2012 at 10:11 AM, Jason Friedman <jason@powerpull.net> wrote:
> $ env
>
> produces about 100 entries, most of which are provided by my .bashrc;
> cron provides only a limited number of environment variables.
>
> I want my python 3.2.2 script, called via cron, to know what those
> additional variables are.  How?

Looking into my crystal ball, I'm wondering if perhaps what you're
asking is for your cron job to have environment variables that aren't
set by cron, ones that you can see in your bash environment. This is a
common issue (usually with $PATH), and by no means Python-specific. A
quick web search will bring up some results, for instance:

http://www.google.com/search?q=cron+environment+variables
http://duckduckgo.com/?q=cron+environment+variables
http://www.bing.com/search?q=cron+environment+variables

If this isn't what you're asking about, please consider clarifying
your question :)

Chris Angelico

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


Thread

Re: parse an environment file Chris Angelico <rosuav@gmail.com> - 2012-10-01 14:20 +1000

csiph-web