configuration-files

Insert a character after (n) characters and repeat(n) times - vim

允我心安 提交于 2021-02-19 03:46:13
问题 Frequently i receive tickets from our support to make a dhcp reservation on isc-dhcp. Some printers(cof,cof HP) print the mac address information on the test page this way: 002481F33A9C ; and obviously the support guys write this way to the Ticket. I want to change to 00:24:81:F3:3A:9C layout and use an efficient way to do a "insert : after 2 characters 4 times". I know that i can achieve this with macros: qq " start recording -> register q ll " move the cursor 2 characters right i " enter

Program configuration data in Unix/Linux

守給你的承諾、 提交于 2021-02-18 22:38:35
问题 What is recommended way to keep a user configuration data in Unix/Linux? My programming language is C++. Configuration data will be kept in XML/text/binary format, I have no problem with handling such files. I want to know where can I keep them. For example, in the Windows OS configuration data may be kept in the Registry (old way) or in user application data directory. What about Linux? I need read/write access to configuration files. 回答1: The concept of the registry is peculiar to Windows,

Program configuration data in Unix/Linux

烈酒焚心 提交于 2021-02-18 22:37:06
问题 What is recommended way to keep a user configuration data in Unix/Linux? My programming language is C++. Configuration data will be kept in XML/text/binary format, I have no problem with handling such files. I want to know where can I keep them. For example, in the Windows OS configuration data may be kept in the Registry (old way) or in user application data directory. What about Linux? I need read/write access to configuration files. 回答1: The concept of the registry is peculiar to Windows,

Obtaining cross-platform path for config file (C/C++)

一世执手 提交于 2021-02-18 11:33:51
问题 I would like to store my application's settings in a configuration file. Under Linux (and Mac?) this (might) be /home/user/.config/app.conf while under Windows it (might) be "C:\Documents and Settings\username\Application Data\app.conf". It can of course be stored elsewhere, so the only way to get the correct location is to use a platform-specific function. Suffice it to say I don't wish to risk coding this myself and getting it wrong (because I lack access to some of these platforms for

pg_config shows 9.4 instead of 9.3

。_饼干妹妹 提交于 2021-02-18 11:06:50
问题 I am using Postgres 9.3, however my pg_config points at 9.4, preventing me from building extensions (pgTap). $ sudo aptitude search postgresql | grep ^i i postgresql-9.3 - object-relational SQL database, version 9. i postgresql-client-9.3 - front-end programs for PostgreSQL 9.3 i A postgresql-client-common - manager for multiple PostgreSQL client ver i A postgresql-common - PostgreSQL database-cluster manager i postgresql-contrib-9.3 - additional facilities for PostgreSQL As you can see above

including python file from project root in setup.py build

三世轮回 提交于 2021-02-07 19:49:39
问题 I am trying to include a python file in the build/lib directory created when running python setup.py install In particular, I would like to include a simple configuration file ('definitions.py') that defines a ROOT_DIR variable, which is then used by subpackages. The 'definitions.py' file contains: import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) My goal is to have configuration files within each subpackage ('config.py') call ROOT_DIR to build their own absolute paths: from

including python file from project root in setup.py build

て烟熏妆下的殇ゞ 提交于 2021-02-07 19:49:35
问题 I am trying to include a python file in the build/lib directory created when running python setup.py install In particular, I would like to include a simple configuration file ('definitions.py') that defines a ROOT_DIR variable, which is then used by subpackages. The 'definitions.py' file contains: import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) My goal is to have configuration files within each subpackage ('config.py') call ROOT_DIR to build their own absolute paths: from

including python file from project root in setup.py build

让人想犯罪 __ 提交于 2021-02-07 19:48:49
问题 I am trying to include a python file in the build/lib directory created when running python setup.py install In particular, I would like to include a simple configuration file ('definitions.py') that defines a ROOT_DIR variable, which is then used by subpackages. The 'definitions.py' file contains: import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) My goal is to have configuration files within each subpackage ('config.py') call ROOT_DIR to build their own absolute paths: from

Packaging Python applications with configuration files

五迷三道 提交于 2021-02-06 01:59:34
问题 I'm using ConfigParser for configuring my application, and now I want to make it easily distributable, and at the same time preserve the configurability. I'm thinking I need a directory with configuration file templates, and some way of generating the configuration to actually use from these. Then I need a place to store it that will work in virtualenv, the users home directory etc. I want it to be as close to how normal Unix packages work, i.e. have config in etc, but with overrides in home

Packaging Python applications with configuration files

删除回忆录丶 提交于 2021-02-06 01:58:33
问题 I'm using ConfigParser for configuring my application, and now I want to make it easily distributable, and at the same time preserve the configurability. I'm thinking I need a directory with configuration file templates, and some way of generating the configuration to actually use from these. Then I need a place to store it that will work in virtualenv, the users home directory etc. I want it to be as close to how normal Unix packages work, i.e. have config in etc, but with overrides in home