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-06-2012
On Sun, Oct 7, 2012 at 4:14 AM, Jason Friedman <(E-Mail Removed)> wrote:
>> 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 scratched my own itch:
> http://code.activestate.com/recipes/...parse-profile/.


And there you have it! A subset of bash syntax and a Python parser. Job done!

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