Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18376
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ashton@fagg.id.au> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.049 |
| X-Spam-Evidence | '*H*': 0.90; '*S*': 0.00; 'script,': 0.07; 'python': 0.08; 'relies': 0.09; 'codebase': 0.16; 'runs.': 0.16; 'subject:Setting': 0.16; 'received:74.125.82.44': 0.16; 'received :mail-ww0-f44.google.com': 0.16; "doesn't": 0.22; 'changes,': 0.24; "i'm": 0.26; 'tried': 0.27; 'variable': 0.28; 'bit': 0.28; 'script': 0.28; 'oversee': 0.29; 'environment': 0.30; 'url:au': 0.31; 'thanks': 0.31; "i've": 0.31; 'header:User-Agent:1': 0.33; 'there': 0.33; 'to:addr:python-list': 0.34; 'things': 0.34; 'anything': 0.34; 'minutes,': 0.34; 'set.': 0.34; 'received:74.125.82': 0.35; 'list.': 0.35; 'file': 0.36; 'beginning': 0.36; 'data.': 0.36; 'to:name:python-list': 0.37; 'run': 0.37; 'machine': 0.37; 'received:74.125': 0.37; 'received:google.com': 0.37; 'using': 0.38; 'forgive': 0.38; 'some': 0.38; 'being': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'our': 0.64; 'note:': 0.69; 'calm': 0.84; 'machine,': 0.84; 'pain': 0.84 |
| Date | Tue, 03 Jan 2012 15:45:20 +1000 |
| From | Ashton Fagg <ashton@fagg.id.au> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110805 Icedove/5.0 |
| MIME-Version | 1.0 |
| To | python-list <python-list@python.org> |
| Subject | Setting an environment variable. |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| 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.4333.1325569526.27778.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1325569526 news.xs4all.nl 6909 [2001:888:2000:d::a6]:59459 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:18376 |
Show key headers only | View raw
Hi list.
A bit new to Python so please forgive my potential ignorance.
I'm working with an embedded machine, which is using a Python script to
oversee the acquisition of some data. The supervisor script, which is
run by crontab every 5 minutes, relies on an environment variable to be
set. I've tried to set the environment variable inside crontab, however
this doesn't work when the script runs.
Is there a nice way to do this inside the supervisor script itself?
Would an os.system("export foo=/bar/foo/bar") at the very beginning of
the script do what I want? I would just like to check before I make
changes, as being an embedded machine it's a bit of a pain to update
things like this...(read only file system)
Note: This is for Python 2.4. I have no ability to update to anything
newer as this is what our codebase relies upon.
Thanks and regards,
Ashton.
--
Ashton Fagg (ashton@fagg.id.au)
Web: http://www.fagg.id.au/~ashton/
Keep calm and call Batman.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Setting an environment variable. Ashton Fagg <ashton@fagg.id.au> - 2012-01-03 15:45 +1000 Re: Setting an environment variable. Nobody <nobody@nowhere.com> - 2012-01-03 20:29 +0000
csiph-web