[gimp] plug-ins: port palette-offset to Python 3.



commit 82ada55b99b52b5ad6baa3e5329f51f569827c96
Author: Jehan <jehan girinstud io>
Date:   Tue Aug 6 01:01:53 2019 +0200

    plug-ins: port palette-offset to Python 3.
    
    Oups, I left the plug-in as Python 2. This was still a good
    proof-of-concept that GIMP 3 will support as well Python 2 and Python 3
    (even though Python 2 is end-of-life soon anyway).

 plug-ins/python/palette-offset.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py
index f5bba51b54..5329da4cce 100644
--- a/plug-ins/python/palette-offset.py
+++ b/plug-ins/python/palette-offset.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #    This program is free software: you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -48,10 +48,10 @@ def run(procedure, args, data):
         palette = Gimp.palette_duplicate (palette)
 
     tmp_entry_array = []
-    for i in xrange (num_colors):
+    for i in range (num_colors):
         tmp_entry_array.append  ((Gimp.palette_entry_get_name (palette, i)[1],
                                   Gimp.palette_entry_get_color (palette, i)[1]))
-    for i in xrange (num_colors):
+    for i in range (num_colors):
         target_index = i + amount
         if target_index >= num_colors:
             target_index -= num_colors


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]