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.

__dict__ = mappingproxy({'__module__': 'PyFoam.ThirdParty.Gnuplot.gp_macosx', '__doc__': 'The configuration options for gnuplot on Mac OS X.\n\n See the gp_unix.py for documentation on all of the parameters.\n\n ', 'gnuplot_command': 'gnuplot', 'recognizes_persist': None, 'prefer_persist': 0, 'recognizes_binary_splot': 1, 'prefer_inline_data': 0, 'support_fifo': 1, 'prefer_fifo_data': 1, 'default_term': 'aqua', 'default_lpr': '| lpr', 'prefer_enhanced_postscript': 1, '__dict__': <attribute '__dict__' of 'GnuplotOpts' objects>, '__weakref__': <attribute '__weakref__' of 'GnuplotOpts' objects>})
__module__ = 'PyFoam.ThirdParty.Gnuplot.gp_macosx'
__weakref__

list of weak references to the object (if defined)

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.

__call__(s)[source]

Send a command string to gnuplot, followed by newline.

__del__()[source]
__dict__ = mappingproxy({'__module__': 'PyFoam.ThirdParty.Gnuplot.gp_macosx', '__doc__': "Unsophisticated interface to a running gnuplot program.\n\n This represents a running gnuplot program and the means to\n communicate with it at a primitive level (i.e., pass it commands\n or data). When the object is destroyed, the gnuplot program exits\n (unless the 'persist' option was set). The communication is\n one-way; gnuplot's text output just goes to stdout with no attempt\n to check it for error messages.\n\n Members:\n\n 'gnuplot' -- the pipe to the gnuplot command.\n\n Methods:\n\n '__init__' -- start up the program.\n\n '__call__' -- pass an arbitrary string to the gnuplot program,\n followed by a newline.\n\n 'write' -- pass an arbitrary string to the gnuplot program.\n\n 'flush' -- cause pending output to be written immediately.\n\n 'close' -- close the connection to gnuplot.\n\n ", '__init__': <function GnuplotProcess.__init__>, 'close': <function GnuplotProcess.close>, '__del__': <function GnuplotProcess.__del__>, '__call__': <function GnuplotProcess.__call__>, '__dict__': <attribute '__dict__' of 'GnuplotProcess' objects>, '__weakref__': <attribute '__weakref__' of 'GnuplotProcess' objects>})
__init__(persist=None, quiet=False)[source]

Start a gnuplot process.

Create a ‘GnuplotProcess’ object. This starts a gnuplot program and prepares to write commands to it.

Keyword arguments:

‘persist=1’ – start gnuplot with the ‘-persist’ option,

(which leaves the plot window on the screen even after the gnuplot program ends, and creates a new plot window each time the terminal type is set to ‘x11’). This option is not available on older versions of gnuplot.

__module__ = 'PyFoam.ThirdParty.Gnuplot.gp_macosx'
__weakref__

list of weak references to the object (if defined)

close()[source]
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.