ericmandel / pyds9

Python connection to SAOimage DS9 via XPA
76 stars 41 forks source link

expose ds9Globals #52

Closed ericmandel closed 6 years ago

ericmandel commented 6 years ago

@montefra Is there a reason we are not exposing ds9Globals? For debugging (and perhaps to allow modification), it would be convenient to be able to do this:

>>> import pyds9
>>> pyds9.ds9Globals
{u'ulist': ('Darwin', 'baba.local', '16.7.0', 'Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64', 'x86_64', 'i386'), u'bin_cmd': [u'array', u'fits', u'fits image', u'fits table', u'fits slice', u'gif', u'jpeg', u'mecube', u'mosaic', u'mosaicimage', u'nrrd', u'png', u'rgbarray', u'rgbcube', u'rgbimage', u'tiff'], u'progs': (u'/Users/eric/python/lib/python2.7/site-packages/pyds9-1.9.dev154-py2.7-macosx-10.6-intel.egg/pyds9/xpans', [u'/Users/eric/bin/ds9']), u'numpy': 1, u'pyfits': 1}

I had this exposed at one point, so I'm not sure if it was hidden on purpose or by accident.

montefra commented 6 years ago

They are accessible as under pyds9.pyds9.ds9Globals. The are hidden by accident, since I moved python files around. If you want I can easiely expose ds9Globals at the module level.

ericmandel commented 6 years ago

Unless there is some Python-related argument against exposing ds9Globals at the module level, I would recommend doing that. At your convenience, of course!

montefra commented 6 years ago

There is nothing against it. It's a very easy fix.

ericmandel commented 6 years ago

OK, thanks, I'll close this one.

montefra commented 6 years ago

resolved in #57