Questions tagged [configuration-files]

Files that configure the initial settings for some computer programs.

2246 questions
31
votes
5 answers

How do I import an iTerm2 profile?

This question helped me with how to export a profile configuration file, but how do I import that file into iterm2 on my new machine? (the file I exported was called com.googlecode.iterm2.plist, for what it's worth)
Stew
  • 4,495
  • 6
  • 31
  • 41
31
votes
3 answers

ConfigObj/ConfigParser vs. using YAML for Python settings file

Which is better for creating a settings file for Python programs, the built-in module (ConfigParser) or the independent project (ConfigObj), or using the YAML data serialization format? I have heard that ConfigObj is easier to use than…
Apophenia Overload
  • 2,485
  • 3
  • 28
  • 46
31
votes
3 answers

Where do I put my XML beans in a Spring Boot application?

I'm getting back into Spring (currently v4). It's all wonderful now with @SpringBootApplication and the other annotations but all the documentation seems to forget to mention how I define other beans in XML! For example I'd like to create an "SFTP…
David Newcomb
  • 10,639
  • 3
  • 49
  • 62
29
votes
4 answers

how to have custom attribute in ConfigurationElementCollection?

for configuration as following ... other entries when implement a MyCollection, what should i do for the "default" attribute?
jojo
  • 13,583
  • 35
  • 90
  • 123
29
votes
2 answers

How to get the current directory on a class library?

I've been looking around but I have not found a solution for this problem: I want to create a class library that has a configuration file under a sub-directory called Configuration. I want that class library to be deployed anywhere and I want it to…
nandos
  • 1,207
  • 2
  • 11
  • 20
28
votes
4 answers

NLog configuration in appsettings.json instead of nlog.config in .NET Core

The NLog documentation explains how to configure NLog for .NET Core applications by using an nlog.config XML file. However, I'd prefer to have just one configuration file for my application - appsettings.json. For .NET Framework apps, it's possible…
AlliterativeAlice
  • 11,841
  • 9
  • 52
  • 69
28
votes
3 answers

Can ConfigurationManager retain XML comments on Save()?

I've written a small utility that allows me to change a simple AppSetting for another application's App.config file, and then save the changes: //save a backup copy first. var cfg = ConfigurationManager.OpenExeConfiguration(pathToExeFile); …
Mike Atlas
  • 8,193
  • 4
  • 46
  • 62
28
votes
3 answers

How to syntax check PostgreSQL config files?

I am often editing the pg_hda.conf file and I was just wondering if there is a way to make sure that what I just wrote is correct. So far I'm using a test server to check my changes. Like Apache has its apache2ctl -t command, does Postgres has…
SamK
  • 2,094
  • 3
  • 17
  • 18
27
votes
1 answer

How to enable configSource attribute for Custom Configuration Section in .NET?

following the wealth of information found here how can we get an external .config to work? I've tried the same setup I would use for an external appSettings file, but it is unable to find the file for my custom section. ... …
E Rolnicki
  • 1,677
  • 2
  • 17
  • 26
27
votes
3 answers

PowerShell App.Config

Has anyone worked out how to get PowerShell to use app.config files? I have a couple of .NET DLL's I'd like to use in one of my scripts but they expect their own config sections to be present in app.config/web.config.
Kev
  • 118,037
  • 53
  • 300
  • 385
26
votes
1 answer

Calling a Python function from a shell script

I am trying to figure out how to call a Python function from a shell script. I have a Python file with multiple functions and I need to use the values returned by them in my shell script. Is there a way to do it. I am doing this in order to read a…
user747858
26
votes
4 answers

What is the best way to store configuration variables in PHP?

I need to store a bunch of configuration information in PHP. I have considered the following.... // Doesn't seem right. $mysqlPass = 'password'; // Seems slightly better. $config = array( 'mysql_pass' => 'password' ); // Seems dangerous…
alex
  • 479,566
  • 201
  • 878
  • 984
26
votes
7 answers

Use an INI file in C on Linux

Is there a standard way of reading a kind of configuration like INI files for Linux using C? I am working on a Linux based handheld and writing code in C. Otherwise, I shall like to know about any alternatives. Final update: I have explored and even…
Kangkan
  • 15,267
  • 10
  • 70
  • 113
26
votes
3 answers

Java equivalent to app.config?

Is there a Java equivalent to .NET's App.Config? If not is there a standard way to keep you application settings, so that they can be changed after an app has been distributed?
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
25
votes
10 answers

PHP - Application config file stored as - ini,php,sql,cached,php class,JSON,php array?

I am trying to decide on the best way to store my applications configuration settings. There are so many options. The majority of applications I have seen have used a simple require and a PHP file that contains variables. There seem to be far more…
Mark
  • 5,423
  • 11
  • 47
  • 62