Home | Trees | Indices | Help |
---|
|
1 # $Id: gp_mac.py 292 2006-03-03 09:49:04Z mhagger $ 2 3 # Copyright (C) 1999-2003 Michael Haggerty <mhagger@alum.mit.edu> 4 # Thanks to Tony Ingraldi and Noboru Yamamoto for their contributions. 5 # 6 # This file is licensed under the GNU Lesser General Public License 7 # (LGPL). See LICENSE.txt for details. 8 9 """gp_mac -- an interface to gnuplot for the Macintosh. 10 11 """ 12 13 import os, string 14 15 import Errors 16 17 18 # ############ Configuration variables: ################################ 1921 """The configuration options for gnuplot on the Macintosh. 22 23 See gp.py for details about the meaning of these options. Please 24 let me know if you know better choices for these settings.""" 25 26 # The '-persist' option is not supported on the Mac: 27 recognizes_persist = 0 28 29 # Apparently the Mac can use binary data: 30 recognizes_binary_splot = 1 31 32 # Apparently the Mac can not use inline data: 33 prefer_inline_data = 0 34 35 # os.mkfifo is not supported on the Mac. 36 support_fifo = 0 37 prefer_fifo_data = 0 38 39 # The default choice for the 'set term' command (to display on screen). 40 # Terminal types are different in Gnuplot 3.7.1c. 41 # For earlier versions, this was default_term = 'macintosh' 42 default_term = 'pict' 43 44 # I don't know how to print directly to a printer on the Mac: 45 default_lpr = '| lpr' 46 47 # Used the 'enhanced' option of postscript by default? Set to 48 # None (*not* 0!) if your version of gnuplot doesn't support 49 # enhanced postscript. 50 prefer_enhanced_postscript = 151 52 # ############ End of configuration options ############################ 53 54 55 # The Macintosh doesn't support pipes so communication is via 56 # AppleEvents. 57 58 import gnuplot_Suites 59 import Required_Suite 60 import aetools 61 62 63 # Mac doesn't recognize persist. 66 6768 -class _GNUPLOT(aetools.TalkTo, 69 Required_Suite.Required_Suite, 70 gnuplot_Suites.gnuplot_Suite, 71 gnuplot_Suites.odds_and_ends, 72 gnuplot_Suites.Standard_Suite, 73 gnuplot_Suites.Miscellaneous_Events):78 7981 """Unsophisticated interface to a running gnuplot program. 82 83 See gp_unix.GnuplotProcess for usage information. 84 85 """ 8612888 """Start a gnuplot process. 89 90 Create a 'GnuplotProcess' object. This starts a gnuplot 91 program and prepares to write commands to it. 92 93 Keyword arguments: 94 95 'persist' -- the '-persist' option is not supported on the 96 Macintosh so this argument must be zero. 97 98 """ 99 100 if persist: 101 raise Errors.OptionError( 102 '-persist is not supported on the Macintosh!') 103 104 self.gnuplot = _GNUPLOT()105 110112 self.close()113115 """Mac gnuplot apparently requires '\r' to end statements.""" 116 117 self.gnuplot.gnuexec(string.replace(s, '\n', os.linesep))118 121
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Jun 9 23:05:15 2010 | http://epydoc.sourceforge.net |