configuration

What does "rc" in matplotlib's rcParams stand for?

What does "rc" in matplotlib's rcParams stand for? Question: matplotlibrc configuration files are used to customize all kinds of properties in matplotlib. One can change the rc settings to customize the default parameters e.g: matplotlib.rcParams[‘font.family’] = ‘times new roman’ … but what does "rc" stand for? I can’t find any explanation in the docs Asked …

Total answers: 1

How to run Debug server for Django project in PyCharm Community Edition?

How to run Debug server for Django project in PyCharm Community Edition? Question: Has anyone had issues setting up a debug configuration for Django project in PyCharm Community Edition? Community Edition of the IDE is lacking the project type option on project setup and then when I am setting up Debug or Run config it …

Total answers: 2

Storing the secrets (passwords) in a separate file

Storing the secrets (passwords) in a separate file Question: What’s the simplest way to store the application secrets (passwords, access tokens) for a Python script? I thought it’d be a *.yml file like in Ruby but surprisingly I found that it wasn’t the case. So what is it then? What are the most simplest solutions? …

Total answers: 3

Nginx is throwing an 403 Forbidden on Static Files

Nginx is throwing an 403 Forbidden on Static Files Question: I have a django app, python 2.7 with gunicorn and nginx. Nginx is throwing a 403 Forbidden Error, if I try to view anything in my static folder @: /home/ubuntu/virtualenv/myapp/myapp/homelaunch/static nginx config(/etc/nginx/sites-enabled/myapp) contains: server { listen 80; server_name *.myapp.com; access_log /home/ubuntu/virtualenv/myapp/error/access.log; error_log /home/ubuntu/virtualenv/myapp/error/error.log warn; connection_pool_size …

Total answers: 9

How to log IPython history to text file?

How to log IPython history to text file? Question: After some searching and trawling through the IPython documentation and some code, I can’t seem to figure out whether it’s possible to store the command history (not the output log) to a text file rather than an SQLite database. ipython –help-all seems to indicate that this …

Total answers: 5

A configuration file that can be read by python and shell

A configuration file that can be read by python and shell Question: I have python scripts and shell scripts in the same folder which both need configuration. I currently have a config.py for my python scripts but I was wondering if it is possible to have a single configuration file which can be easily read …

Total answers: 4

How to change filehandle with Python logging on the fly with different classes and imports

How to change filehandle with Python logging on the fly with different classes and imports Question: I cannot perform an on-the-fly logging fileHandle change. For example, I have 3 classes one.py import logging class One(): def __init__(self,txt=”?”): logging.debug(“Hey, I’m the class One and I say: %s” % txt) two.py import logging class Two(): def __init__(self,txt=”?”): …

Total answers: 5

How to setup a group in supervisord?

How to setup a group in supervisord? Question: So I’m setting up supervisord and trying to control several processes and that all works fine, now I want to setup a group so I can start/stop different sets of processes rather than all or nothing. Here’s a snippet of my config file. [group:tapjoy] programs=tapjoy-game1,tapjoy-game2 [program:tapjoy-game1] command=python …

Total answers: 2

python setup.py configuration to install files in custom directories

python setup.py configuration to install files in custom directories Question: I want to create a setup.py which would install my files into custom directories. I have a certain prefix, where I would like to get the following result: /my/prefix/ bin/ script.sh libexec/ one.py two.py … lib/pythonX.Y/site-packages/ package/… My initial project is following: / script.sh one.py …

Total answers: 2

How to select Python version in PyCharm?

How to select Python version in PyCharm? Question: I have PyCharm 1.5.4 and have used the “Open Directory” option to open the contents of a folder in the IDE. I have Python version 3.2 selected (it shows up under the “External Libraries” node). How can I select another version of Python (that I already have …

Total answers: 6