Package PyFoam :: Package ThirdParty :: Package Gnuplot :: Module gp
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.ThirdParty.Gnuplot.gp

 1  # $Id: gp.py,v 2.13 2003/04/21 09:44:09 mhagger Exp $ 
 2   
 3  # Copyright (C) 1998-2003 Michael Haggerty <mhagger@alum.mit.edu> 
 4  # 
 5  # This file is licensed under the GNU Lesser General Public License 
 6  # (LGPL).  See LICENSE.txt for details. 
 7   
 8  """gp -- a platform-independent interface to a gnuplot process. 
 9   
10  This file imports a low-level, platform-independent interface to the 
11  gnuplot program.  Which interface is imported depends on the platform. 
12  There are variations of this file for Unix, the Macintosh, and for 
13  Windows called gp_unix.py, gp_mac.py, and gp_win32.py, respectively. 
14  Note that the end-user should use the more capable interface from 
15  __init__.py (i.e., 'import Gnuplot') rather than the low-level 
16  interface imported by this file. 
17   
18  See gp_unix.py for most documentation about the facilities of the 
19  gp_*.py modules. 
20   
21  """ 
22   
23  __cvs_version__ = '$Revision: 2.13 $' 
24   
25  import sys 
26   
27  # Low-level communication with gnuplot is platform-dependent.  Import 
28  # the appropriate implementation of GnuplotProcess based on the 
29  # platform: 
30  if sys.platform == 'mac': 
31      from gp_mac import GnuplotOpts, GnuplotProcess, test_persist 
32  elif sys.platform == 'win32': 
33      from gp_win32 import GnuplotOpts, GnuplotProcess, test_persist 
34  elif sys.platform == 'darwin': 
35      from gp_macosx import GnuplotOpts, GnuplotProcess, test_persist 
36  elif sys.platform[:4] == 'java': 
37      from gp_java import GnuplotOpts, GnuplotProcess, test_persist 
38  elif sys.platform == 'cygwin': 
39      from gp_cygwin import GnuplotOpts, GnuplotProcess, test_persist 
40  else: 
41      from gp_unix import GnuplotOpts, GnuplotProcess, test_persist 
42