[Top] [Prev] [Next] [Bottom]
1.2 Using the Python Graphics Interface
In order to use PyGraph, you first need to have Python installed on your system. If you do not have Python, you can obtain it free from the Python pages at http://www.python.org. You may need the help of your system administrator to install it on your machine. Once you have Python, you have to know at least a smattering of the language. The best way to do this is to download the excellent tutorial from the Python pages, sit down at your computer or terminal, and work your way through it.
Before using the Python Graphics Interface, you should set some environment variables as follows.
- Your PATH variable should contain the path to the python executable.
- You should set a PYTHONPATH variable to point to all directories that contain Python extensions or modules that you will be loading, which may include the OOG modules, ezplot, and narcissemodule or gistCmodule. Check with your System Manager for the exact specifications on your local systems.
- Unless you create your own plotter objects, PyGraph will create a default Gist Plotter which will plot to a Gist window only. If you want your default Plotter to be a Narcisse Plotter, then set the variable PYGRAPH to Nar or Narcisse.
A Gist Plotter object automatically creates its own Gist window and then plots to that window. Narcisse, however, works differently. Narcisse is established as a separately running process, to which the Plotter communicates via sockets. Thus, to run a Narcisse Plotter, you must first open a Narcisse.1 To do so, you need to go through the following steps:
- Set your environment variable PORT_SERVEUR2 to 0.
- Start up Narcisse by typing in the command Narcisse &. It will take a few moments for the Narcisse GUI to open, then immediately afterwards it will be covered by an annoying window which you can eliminate by clicking its OK button.
- You will note that there is a server port number given on the GUI. Set your PORT_SERVEUR variable to this value.
- Narcisse has an annoying habit of saving everything it does to a multitude of files, and notifying you on the fly of all its computations. If you do a lot of graphics, these files can quickly fill up your quota. In addition, the running commentary on file writing and computation on the GUI is time-consuming and slows Narcisse down to a truly glacial pace. To avoid this, you need to turn off a number of options via the GUI before you begin. They are all under the STATE submenu of the FILE menu, and should be set as follows: set ``Socket compute'' to ``no,'' set ``File save'' to ``nothing,'' set ``Config save'' to ``no,'' and set ``Ihm compute'' to ``no.'' (``IHM'' are the French initials for ``GUI.'')
[Top] [Prev] [Next] [Bottom]
1
I am going to assume that you already have Narcisse installed on your system, and its directory path in your PATH variable.
2
We did tell you that Narcisse was French, didn't we?
support@icf.llnl.gov
Copyright © 1997,Regents of the University of California. All rights
reserved.