[Pythonmac-SIG] gnuplot again -- it works, but some questions

Russell E Owen owen@astro.washington.edu
Fri, 23 Mar 2001 14:50:25 -0800


Larry Meyn's helpful postings on installing gnuplot inspired me to 
get it and try to install it under Mac Python 2.0. It works! However, 
I had to do things a bit differently and it left me a bit puzzled 
about how things work.

I obtained Mac gnuplot 3.7.1b and gnuplot.py 1.5 and modified 
gp_mac.py approximately as per Larry's instructions, with changes as 
noted below.

My copy of gp_mac.py tried to import Required_Suite, which failed 
because it's not in the default search path. (Required_Suite is in 
package StdSuites, which *is* in the search path). The changes I made 
to gp_mac.py were as follows:

import StdSuites.Required_Suite	# originally: import Required_Suite
...
class _GNUPLOT(aetools.TalkTo,
	StdSuites.Required_Suite.Required_Suite_Events,	# originally: 
Required_Suite
...
but I feel I am surely missing something obvious, since Larry didn't 
have to do this. I doubt it's a difference between Mac Python 2.1 and 
2.0 since they seem to have the same directory structure. Am I 
missing some obvious trick?


Also, I wonder if there's any consensus as to the best way to handle 
the fact that Required_Suite exists in two locations and the copy in 
StdSuites is clearly broken (missing most of its code). I tried 
moving the "good" file into StdSuites, but that failed, apparently 
because the "good" Required_Suite.py defines class Required_Suite, 
whereas the bad Required_Suite.py defines class Required_Suite_Events.

I ended up copying the code that defined class Required_Suite from 
the good Required_Suite.py into the bad one, but making it define 
class Required_Suite_Events in the bad file. This is approximately 
what Larry suggested.


Curiosity aside, it's working and I'm thrilled.

Thanks, Larry!

-- Russell