.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/quickstart/show_config.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_quickstart_show_config.py: ===================================================== Finding out where the config and filestore are ===================================================== Easily locating your config file and filestore locations. This comes in useful when things don't work because the config file is not set correctly. .. GENERATED FROM PYTHON SOURCE LINES 9-13 .. code-block:: default from __future__ import print_function import cortex from cortex.options import config .. GENERATED FROM PYTHON SOURCE LINES 14-15 Finding where your config file is. .. GENERATED FROM PYTHON SOURCE LINES 15-17 .. code-block:: default print(cortex.options.usercfg) .. GENERATED FROM PYTHON SOURCE LINES 18-20 Finding where the current filestore is. Useful for when your subjects don't show up in cortex.db, and all you have is S1. .. GENERATED FROM PYTHON SOURCE LINES 20-22 .. code-block:: default print(config.get('basic', 'filestore')) .. GENERATED FROM PYTHON SOURCE LINES 23-25 Finding where pycortex is looking for colormaps. Useful for when you get color map not found messages. .. GENERATED FROM PYTHON SOURCE LINES 25-27 .. code-block:: default print(config.get('webgl', 'colormaps')) .. GENERATED FROM PYTHON SOURCE LINES 28-30 To look at your config file, it is recommended that you open it with a text editor. However, you *can* still look at options from within pycortex. .. GENERATED FROM PYTHON SOURCE LINES 30-37 .. code-block:: default # sections gets the upper-level sections in the config file sections = config.sections() print(sections) # items gets the option items within a section as a list of key-value pairs. basic_config = config.items('paths_default') print(basic_config) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_quickstart_show_config.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: show_config.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: show_config.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_