File: Port-to-Python-3.patch

package info (click to toggle)
rhinote 0.7.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 308 kB
  • sloc: python: 212; sh: 43; makefile: 32
file content (36 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Andrea Bolognani <eof@kiyuko.org>
Date: Sat, 7 Dec 2019 14:53:46 +0100
Subject: Port to Python 3

Python 2 is going to be EOL soon, so we need to use the current
version of the language going forward; thankfully, getting the
application to run on Python 3 only requires tweaking a couple
of imports.

Forwarded: yes
---
 rhinote.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/rhinote.py b/rhinote.py
index 2fba412..fc54c72 100644
--- a/rhinote.py
+++ b/rhinote.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Filename : rhinote.py
 
 # Rhinote version 0.7.4  A simple "sticky notes" application; Linux version.
@@ -21,8 +21,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St., Fifth Floor, Boston, MA  02110-1301 USA
 
-from Tkinter import *
-import tkFileDialog, tkMessageBox
+from tkinter import *
+import tkinter.filedialog as tkFileDialog
+import tkinter.messagebox as tkMessageBox
 import os
 from os import system