[jbmoody@oakland.edu: Re: [Pythonmac-SIG] Gnuplot Installation]
Jon Moody
jbmoody@oakland.edu
Sat, 24 Mar 2001 17:08:10 -0500
On Sat, Mar 24, 2001 at 09:07:56AM -0800, Larry Meyn wrote:
> Thanks for all the feedback on this topic. I took Jack's advice and
> ran gensuitemodule. This avoids having to tamper with any of the
> Python distribution files like Required_Suite. The gensuitemodule
> produces a gnuplot_Suites package to replace the gnuplot_Suites.py
> file. The only change that seemed to be needed to the generated
> files in this package was to change the name of a method in
> gnuplot_Suite.py from exec to gnuexec. Several changes needed to be
> made to gp_mac.py, but no other files seem to need modification. For
> those interested I've posted a copy of the module at the URL shown
> below. Just drop it into the Lib:site-packages folder. I don't know
> how the distutils package works, so running setup.py won't copy
> everything to the right place. There are a few gnuplot errors
> generated when running test.py, so this is just an interim solution.
>
Actually it's much simpler than this. In the original gp_mac.py that
comes with Gnuplot.py, just make the two changes already mentioned:
in class GnuplotOpts:
default_term = 'pict'
in class _GNUPLOT:
aetools.TalkTo.__init__(self, "{GP}", start=1)
------------------------------------------------
plus, comment as follows starting around line 59:
------------------------------------------------
import gnuplot_Suites
# import Required_Suite
import aetools
class _GNUPLOT(aetools.TalkTo,
#Required_Suite.Required_Suite,
gnuplot_Suites.gnuplot_Suite,
#gnuplot_Suites.odds_and_ends,
#gnuplot_Suites.Standard_Suite,
#gnuplot_Suites.Miscellaneous_Events
):
With these changes, Gnuplot.py's test.py module runs without error
using the new gnuplot-3.7.1a. This works because Gnuplot.py only uses
_one_ AppleEvent call, 'exec' which is renamed to 'gnuexec' since
'exec' is a python reserverd word (there's also a 'flush' method used
but it's not an AE event, it's just a dummy). The 'exec' AppleEvent
is defined for both the old mac-gnuplot and the new gnuplot-3.7.1a.
What's really interesting about the new gnuplot-3.7.1a on the mac,
aside from the fabulous mac-specific terminals 'pict' and 'moov', is
that there's now a 'print' AppleEvent; it should now be possible to
support Gnuplot.py's 'hardcopy' method.
Also, there's a few other new AppleEvents supported ('data size',
'make', 'revert', 'open') as well as a 'document' class. I think it
should be possible to also support Gnuplot.py's 'inline' method. Has
anyone tried this yet?
--
Jon
----- End forwarded message -----