scitools.globaldataΒΆ

Holds global data SAFECODE, VERBOSE, DEBUG, OPTIMIZATION, backend in the scitools package, loaded from a configuration file. (This module also demonstrate how to work with global parameters accross a package in Python.)

The default configuration file looks like this:

; Default configuration file scitools.cfg ; ; Items in this default file can be overridden by ; .scitools.cfg in the directory where the Python program is started ; .scitools.cfg in the user’s home directory

; Some variables in this file can also be overridden by environment ; variables. The name of the environment variable is ; prefix_section_option, where section and option are the section and ; option names as given below and prefix is set below. ; Examples: SCITOOLS_globals_VERBOSE, SCITOOLS_easyviz_backend

[modes] ; Enable setting variables by environment variables with ; prefix_variablename, e.g., SCITOOLS_globals_DEBUG envir prefix = SCITOOLS

; Enable reading from command line through –variablename option, ; e.g., –SCITOOLS_globals_DEBUG ; (such command-line options and values are removed from sys.argv ; after being read such that the rest of the code is not affected) command line arguments = on

[globals] SAFECODE = <bool> on ; boolean: safety checks or not OPTIMIZATION = <str> off ; ‘F77’, ‘C’, ‘vectorization’, ‘on’, etc. VERBOSE = <int> 0 ; an int for the level of verbosity in output DEBUG = <int> 0 ; debug level (0=off) ; python -O implies that DEBUG is set to 0

[scipy] ;load = <bool> yes ; yes: from scipy import * (may have side effects) load = <bool> no ; yes: from scipy import * (may have side effects)

[numpy] numpytools = <bool> no ; no: load numpy and numpyutils, yes: load numpytools

; Configuration of SciPy/NumPy: see documentation of scitools.basics

[easyviz] backend = matplotlib ; default backend ; backends are gnuplot, matplotlib, matlab, veusz, grace, dx, pyx, vtk show = <bool> yes ; screenplot after each plot command interactive = <bool> yes ; update backend after each change color = <bool> no ; hardcopy with color? linestyleorder = <eval> [‘-‘] ; line styles for plots with multiple lines colororder = <eval> [‘b’,’g’,’r’,’c’,’m’,’y’,’k’] ; same for colors clevels = <int> 8 ; default number of contour levels in a contour plot hold = <bool> off ; hold or clear plot between plotting commands grid = <bool> off ; turn grid on or off by default box = <bool> off ; box around boundaries of the axes hidden = <bool> on ; use hidden line removal on meshes colormap = <eval> None ; default colormap fontsize = <int> 12 ; font size used in titles, labels, ... fontname = <str> Helvetica ; font used for titles, labels, ... fgcolor = <eval> (0,0,0) ; foreground color (titles, labels, axes, ...) bgcolor = <eval> (1,1,1) ; axis background color cblocation = <str> EastOutside ; default location for a color bar size = <eval> [None,None] ; default figure size

[gnuplot] ; See gp_unix.py in the Gnuplot.py source for details about the meaning ; of these options. ;gnuplot_command = <str> gnuplot ;recognizes_persist = <eval> None prefer_persist = <int> 1 ;recognizes_binary_splot = <int> 1 ;prefer_inline_data = <int> 0 ;support_fifo = <int> 1 ;prefer_fifo_data = <int> 1 ;default_term = <str> x11 ;default_term = <str> wxt ; wxWidgets ;default_lpr = <str> | lpr ;prefer_enhanced_postscript = <int> 1

[matplotlib] ; Override values from the matplotlib configuration file backend = TkAgg ; default backend ; other backends are ps, Qt4Agg, GTK, GTKAgg, svg, agg, cairo, MacOSX, GTKCairo, WXAgg, TkAgg, QtAgg, FltkAgg, pdf, CocoaAgg, emf, gdk, template, WX ;font.size = <int> 10 ;axes.labelsize = <int> 10 ;text.fontsize = <int> 10 ;xtick.labelsize = <int> 8 ;ytick.labelsize = <int> 8 text.usetex = <bool> false ; use LaTeX or not

Previous topic

scitools.filetable

Next topic

scitools.misc

This Page