Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 812591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:13:35+00:00 2026-05-15T01:13:35+00:00

I am doing some sort of science with a combination of Python, bash scripts

  • 0

I am doing some sort of science with a combination of Python, bash scripts and configuration files with weird syntaxes from old C programs. To run different tests, I have to tune (open text file, edit and save) a number of these files, but it is getting harder and harder to remember which files to edit. Also, the tasks are very repetitive and I end having a bunch of comment lines, switching on and off the settings for a specific run.

I dream of a tool that can keep a list of files (regardless of the file format) and allow me to centrally choose from a predefined list of “profiles”, taking care of editing the script/config files. For example lets say I have a config and script file:

config.cfg

var1 = 1.0
#var1 = 1.5

script.sct

function(200.0)
#function(300.0)

I would like to instead have auxiliary text files:

config.cfg.tem

var1 = $$var1$$

script.sct.tem

function($$par1$$)

and in a central script or even better, a GUI, just switch from profile1 (e.g. var1=1.0,par1=200.0) to profile2 (e.g. var1=1.5,par1=300.0), and the tool to automatically update the text files.

Any idea if such a tools exists?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:13:36+00:00Added an answer on May 15, 2026 at 1:13 am

    There are many, many processors which do this. Looking for a “templating system” will yield tons of elaborate tools.

    OTOH, a very straight forward and simple way would be to use the C preprocessor. Define a settings include file were you #define your settings and then automatically include it when you process your templates.

    $ cpp -include definitions_file input_template output_file
    

    This is simple and has its shortcomings but works often good enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While doing some random experimentation with a factorial program in C, Python and Scheme.
I am doing some sort of lab test record collection but there is a
I'm doing some programming practice right now by trying to sort a 2D array
What sort of conventions would you advise when doing some distance work (say through
I am doing some sort of cronjob inside a WordPress plugin that does the
I'm doing some computer network homework and I'm supposed to develop some sort of
I'm looking for some help converting this from prototype to jQuery. I'm doing some
Basically, I'm doing some sort of image processing using a screen-sized rectangle made of
Just started doing some code porting from .Net CF to Blackberry JDE 4.6.1. But
I am doing some sort of drawing software in WPF, and I have certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.