[pyferret] 37/110: WIP

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 08:41:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository pyferret.

commit 24a203e99292cda34345c732023e8f4f5f832aea
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Fri Oct 30 14:50:11 2015 +0000

    WIP
---
 debian/patches/python3.patch | 109 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 104 insertions(+), 5 deletions(-)

diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index d17d0b2..0fa7625 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -1,8 +1,3 @@
-Author: Alastair McKinstry <mckinstry at debian.org>
-Description: Python3 support for pyferret (INCOMPLETE)
-Last-Updated: 2015-10-30
-Forwarded: no
-
 Index: pyferret-1.1.0/ferretmagic.py
 ===================================================================
 --- pyferret-1.1.0.orig/ferretmagic.py
@@ -312,3 +307,107 @@ Index: pyferret-1.1.0/pyfermod/filenamecompleter.py
 +    print ('')
 +    print ('Success')
  
+Index: pyferret-1.1.0/pviewmod/__init__.py
+===================================================================
+--- pyferret-1.1.0.orig/pviewmod/__init__.py
++++ pyferret-1.1.0/pviewmod/__init__.py
+@@ -8,6 +8,7 @@ This package was developed by the Therma
+ Pacific Marine Environmental Lab (PMEL).
+ '''
+ 
++from __future__ import print_function
+ from multiprocessing import Pipe
+ import sys
+ 
+@@ -222,16 +223,16 @@ if __name__ == "__main__":
+     drawcmnds.append( { "action":"exit" } )
+     # Test each known viewer.
+     for viewername in ( "PipedViewerPQ", ):
+-        print "Testing Viewer %s" % viewername
++        print ("Testing Viewer %s" % viewername)
+         # create the viewer
+         pviewer = PipedViewer(viewername)
+         # submit the commands, pausing after each "show" command
+         for cmd in drawcmnds:
+-            print "Command: %s" % str(cmd)
++            print ("Command: %s" % str(cmd))
+             pviewer.submitCommand(cmd)
+             response = pviewer.checkForResponse()
+             while response:
+-                print "Response: %s" % str(response)
++                print ("Response: %s" % str(response))
+                 response = pviewer.checkForResponse()
+             if cmd["action"] == "show":
+                 raw_input("Press Enter to continue")
+@@ -241,4 +242,4 @@ if __name__ == "__main__":
+         if result != 0:
+             sys.exit(result)
+         else:
+-            print "Done with %s" % viewername
++            print ("Done with %s" % viewername)
+Index: pyferret-1.1.0/pviewmod/pyferretbindings.py
+===================================================================
+--- pyferret-1.1.0.orig/pviewmod/pyferretbindings.py
++++ pyferret-1.1.0/pviewmod/pyferretbindings.py
+@@ -15,9 +15,10 @@ This package was developed by the Therma
+ Pacific Marine Environmental Lab (PMEL).
+ '''
+ 
++from __future__ import print_function
+ from pyferret.graphbind.abstractpyferretbindings import AbstractPyFerretBindings
+ from pipedviewer import PipedViewer
+-
++from past.builtins import xrange
+ 
+ class PyFerretBindings(AbstractPyFerretBindings):
+     '''
+@@ -884,7 +885,7 @@ if __name__ == "__main__":
+     # Initiate pyferret, but stay in python
+     pyferret.init(None, False)
+     for viewertype in ( "PipedViewerPQ", ):
+-        print "Testing bindings for %s" % viewertype
++        print ("Testing bindings for %s" % viewertype)
+         # Create a viewer window
+         title = viewertype + "Tester"
+         bindinst = pyferret.graphbind.createWindow(viewertype, title, True)
+@@ -971,5 +972,5 @@ if __name__ == "__main__":
+             pass
+         bindinst.deleteFont(myfont)
+         bindinst.deleteWindow()
+-        print "Done with bindings for %s" % viewertype
++        print ("Done with bindings for %s" % viewertype)
+ 
+Index: pyferret-1.1.0/pviewmod/scaledialogpq.py
+===================================================================
+--- pyferret-1.1.0.orig/pviewmod/scaledialogpq.py
++++ pyferret-1.1.0/pviewmod/scaledialogpq.py
+@@ -6,6 +6,7 @@ This package was developed by the Therma
+ Pacific Marine Environmental Lab (PMEL).
+ '''
+ 
++from __future__ import print_function
+ from PyQt4.QtCore import SIGNAL, Qt
+ from PyQt4.QtGui  import QApplication, QButtonGroup, QDialog, \
+                          QDialogButtonBox, QGridLayout, QGroupBox, \
+@@ -214,7 +215,7 @@ if __name__ == "__main__":
+     app = QApplication(["tester"])
+     resizedialog = ScaleDialogPQ(1.0, 500, 300, 75, 50, False)
+     retval = resizedialog.exec_()
+-    print "retval = %d" % retval
++    print ("retval = %d" % retval)
+     if retval == QDialog.Accepted:
+         rettuple = resizedialog.getValues()
+-        print "getValues returned: %s" % str(rettuple)
++        print ("getValues returned: %s" % str(rettuple))
+Index: pyferret-1.1.0/pyfermod/__init__.py
+===================================================================
+--- pyferret-1.1.0.orig/pyfermod/__init__.py
++++ pyferret-1.1.0/pyfermod/__init__.py
+@@ -46,6 +46,7 @@ import readline
+ import numpy
+ import numpy.ma
+ import StringIO
++from past.builtins import xrange
+ 
+ # In Debian, an application should be able to start without environmental
+ # variables needing to be set. So set them here.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyferret.git



More information about the debian-science-commits mailing list