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


Groups > comp.lang.python > #30673 > unrolled thread

Re: parse an environment file

Started byChris Angelico <rosuav@gmail.com>
First post2012-10-03 14:03 +1000
Last post2012-10-03 14:03 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#30673 — Re: parse an environment file

FromChris Angelico <rosuav@gmail.com>
Date2012-10-03 14:03 +1000
SubjectRe: parse an environment file
Message-ID<mailman.1753.1349237042.27098.python-list@python.org>
On Wed, Oct 3, 2012 at 1:49 PM, Jason Friedman <jason@powerpull.net> wrote:
> Based on your responses and everyone's responses I'm guessing that
> what I am doing is sufficiently novel that there is no canned
> solution.  I looked at shlex but did not see how that would be
> helpful.

The only canned solution for parsing a bash script is bash. Think
about it the other way around: If you wanted to have a Python variable
made available to a bash script, the obvious thing to do is to invoke
Python. It's the same thing.

I recommend going with Hans Mulder's suggestion of a wrapper script;
that seems to be the cleanest option available.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web