source: trunk/config_example.py @ 2109

Last change on this file since 2109 was 2109, checked in by toby, 7 years ago

Andrey's enhancement: keep track of last GPX, import & export directories; optionally save the 1st two

File size: 3.7 KB
Line 
1# -*- coding: utf-8 -*-
2#config.py - Variables used to set optional configuration options
3########### SVN repository information ###################
4# $Date: $
5# $Author: toby $
6# $Revision: $
7# $URL: $
8# $Id: $
9########### SVN repository information ###################
10'''
11*config_example.py: Configuration options*
12-------------------------------------------
13
14This file contains optional configuration options for GSAS-II. The variables
15in this file can be copied to file config.py, which is imported if present.
16Access these variables using :func:`GSASIIpath.GetConfigValue`, which returns
17None if the variable is not set. Note that a config.py file need not
18be present, but if in use it will typically be found with the GSAS-II source
19directory (GSASIIpath.Path2GSAS2) or a directory for local GSAS-II
20modifications (~/.G2local/ or /Documents and Settings/<User>/.G2local/). 
21
22When defining new config variables for GSAS-II, define them here with a
23default value: use None or a string for strings, or use integers or real
24values. Include a doc string after each variable is defined to explain
25what it does. Use names ending in _location or _directory for items
26that will contain directory names.
27
28For example::
29
30    test_int = 0
31    test_float = 0.0
32    test_string = None (or)
33    test_string = 'value'
34'''
35
36debug = False
37'''Set to True to turn on debugging mode.This enables use of IPython on
38exceptions and on calls to :func:`GSASIIpath.IPyBreak`. Calls to
39:func:`GSASIIpath.pdbBreak` will invoke pdb at that location.
40
41If debug is False, calls to :func:`GSASIIpath.IPyBreak` and
42:func:`GSASIIpath.pdbBreak` are ignored.
43'''
44
45Transpose = False
46'Set to True to cause images to be Transposed when read (for code development)'
47
48Enable_logging = False
49'Set to True to enable use of command logging (under development.)'
50
51logging_debug = False
52'Set to True to enable debug for logging (under development.)'
53
54Help_mode = "browser"
55'''Set to "internal" to use a Python-based web viewer to display
56help documentation and tutorials. If set to the default ("browser")
57the default web browser is used.
58'''
59
60Tutorial_location = None
61'''Change this to place tutorials by in a different spot. If None, this defaults to
62<user>/My Documents/G2tutorials (on windows) or <user>/G2tutorials. If you want to
63use a different location, this can be set here. To install into the location where
64GSAS-II is installed, use this::
65
66    Tutorial_location = GSASIIpath.path2GSAS2
67
68As another example, to use ~/.G2tutorials do this::
69
70    Tutorial_location = '~/.G2tutorials'
71
72Note that os.path.expanduser is run on Tutorial_location before it is used.
73Also note that GSASIIpath is imported inside config.py; other imports should be
74avoided.
75'''
76
77Save_paths=False
78'''When set to True, the last-used path for saving of .gpx and for
79importing of input files is saved in the configuration file.
80Note that since this causes the config.py file to be updated whenever files are
81saved/imported, any temporary config settings can be saved to disk at that
82point.
83'''
84
85Starting_directory=None
86'''Specifies a default location for starting GSAS-II and where .gpx files
87should be read from. Will be updated if Save_paths is True.
88Note that os.path.expanduser is run on this before it is used, so the user's
89home directory can be specified with a '~'.
90'''
91
92Import_directory=None
93'''Specifies a default location for importing (reading) input files. Will be
94updated if Save_paths is True.
95Note that os.path.expanduser is run on this before it is used, so the user's
96home directory can be specified with a '~'.
97'''
98
99wxInspector = False
100'''If set to True, the wxInspector widget is displayed when
101GSAS-II is started.
102'''
Note: See TracBrowser for help on using the repository browser.