Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: parse an environment file

Reply
Thread Tools

Re: parse an environment file

 
 
Chris Angelico
Guest
Posts: n/a
 
      10-03-2012
On Wed, Oct 3, 2012 at 1:49 PM, Jason Friedman <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: parse an environment file Jason Friedman Python 4 10-02-2012 04:16 PM
Re: parse an environment file Chris Angelico Python 0 10-01-2012 02:21 PM
parse an environment file Jason Friedman Python 3 10-01-2012 10:16 AM
Re: parse an environment file Chris Angelico Python 0 10-01-2012 04:20 AM
Re: parse an environment file Dave Angel Python 0 10-01-2012 12:58 AM



Advertisments