PyFoam.ThirdParty.Gnuplot.gp_macosx module¶
gp_macosx – an interface to the command line version of gnuplot used under Mac OS X.
The only difference between this interface and gp_unix is that default_term is ‘aqua’.
This file implements a low-level interface to gnuplot. This file should be imported through gp.py, which in turn should be imported via ‘import Gnuplot’ rather than using these low-level interfaces directly.
-
class
PyFoam.ThirdParty.Gnuplot.gp_macosx.
GnuplotOpts
[source]¶ Bases:
object
The configuration options for gnuplot on Mac OS X.
See the gp_unix.py for documentation on all of the parameters.
-
default_lpr
= '| lpr'¶
-
default_term
= 'aqua'¶
-
gnuplot_command
= 'gnuplot'¶
-
prefer_enhanced_postscript
= 1¶
-
prefer_fifo_data
= 1¶
-
prefer_inline_data
= 0¶
-
prefer_persist
= 0¶
-
recognizes_binary_splot
= 1¶
-
recognizes_persist
= None¶
-
support_fifo
= 1¶
-
-
class
PyFoam.ThirdParty.Gnuplot.gp_macosx.
GnuplotProcess
(persist=None, quiet=False)[source]¶ Bases:
object
Unsophisticated interface to a running gnuplot program.
This represents a running gnuplot program and the means to communicate with it at a primitive level (i.e., pass it commands or data). When the object is destroyed, the gnuplot program exits (unless the ‘persist’ option was set). The communication is one-way; gnuplot’s text output just goes to stdout with no attempt to check it for error messages.
Members:
‘gnuplot’ – the pipe to the gnuplot command.Methods:
‘__init__’ – start up the program.
- ‘__call__’ – pass an arbitrary string to the gnuplot program,
- followed by a newline.
‘write’ – pass an arbitrary string to the gnuplot program.
‘flush’ – cause pending output to be written immediately.
‘close’ – close the connection to gnuplot.
-
PyFoam.ThirdParty.Gnuplot.gp_macosx.
test_persist
()[source]¶ Determine whether gnuplot recognizes the option ‘-persist’.
If the configuration variable ‘recognizes_persist’ is set (i.e., to something other than ‘None’), return that value. Otherwise, try to determine whether the installed version of gnuplot recognizes the -persist option. (If it doesn’t, it should emit an error message with ‘-persist’ in the first line.) Then set ‘recognizes_persist’ accordingly for future reference.