Skip to content

Commit

Permalink
Merge pull request #3 from lsst/tickets/DM-7895-swig-fixes
Browse files Browse the repository at this point in the history
swig fixes to handle unicode in py2
  • Loading branch information
stargaser committed Oct 18, 2016
2 parents c2d0380 + 1f79218 commit e1d788f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/display/ds9/ds9.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def ds9Cmd(cmd=None, trap=True, flush=False, silent=True, frame=None, get=False)
cmdBuffer._lenCommands += 1 + len(cmd)

if flush or cmdBuffer._lenCommands >= cmdBuffer._getSize():
cmd = (cmdBuffer._commands + "\n").encode('utf-8')
cmd = (cmdBuffer._commands + "\n")
cmdBuffer._commands = ""
cmdBuffer._lenCommands = 0
else:
Expand Down
4 changes: 4 additions & 0 deletions python/lsst/display/ds9/xpa.i
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Simple interface to the xpa routines used to communicate with ds9
%rename(set) XPASet1;
%rename(setFd1) XPASetFd1;

%begin %{
#define SWIG_PYTHON_2_UNICODE
%}

%{
#include "xpa.h"
#include "lsst/pex/exceptions/Runtime.h"
Expand Down
1 change: 1 addition & 0 deletions ups/display_ds9.table
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
setupRequired(afw)
setupRequired(xpa)
setupRequired(python_future)

envPrepend(PYTHONPATH, ${PRODUCT_DIR}/python)

0 comments on commit e1d788f

Please sign in to comment.