Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
F
FreeBSD ports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
FreeBSD
FreeBSD ports
Commits
7b1e395e
Verified
Commit
7b1e395e
authored
3 years ago
by
sunpoet
Browse files
Options
Downloads
Patches
Plain Diff
textproc/py-reverend: Fix build with setuptools 58.0.0+
With hat: python
parent
6af46f44
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
textproc/py-reverend/files/patch-2to3
+93
-0
93 additions, 0 deletions
textproc/py-reverend/files/patch-2to3
with
93 additions
and
0 deletions
textproc/py-reverend/files/patch-2to3
0 → 100644
+
93
−
0
View file @
7b1e395e
--- reverend/ui/trainer.py.orig 2004-12-01 17:49:04 UTC
+++ reverend/ui/trainer.py
@@ -4,15 +4,15 @@
# License as published by the Free Software Foundation.
#
-from Tkinter import *
-import tkFileDialog
-import tkSimpleDialog
-import tkMessageBox
+from tkinter import *
+import tkinter.filedialog
+import tkinter.simpledialog
+import tkinter.messagebox
import os
-from util import Command, StatusBar, Notebook
-from tester import TestView
+from .util import Command, StatusBar, Notebook
+from .tester import TestView
class PoolView(Frame):
def __init__(self, master=None, guesser=None, app=None):
@@ -79,20 +79,20 @@
class PoolView(Frame):
self.model[name]=(pool, uTok, tTok, train)
def refresh(self):
- for pool, ut, tt, train in self.model.values():
+ for pool, ut, tt, train in list(self.model.values()):
ut.set(len(pool))
tt.set(pool.tokenCount)
train.set(pool.trainCount)
def save(self):
- path = tkFileDialog.asksaveasfilename()
+ path = tkinter.filedialog.asksaveasfilename()
if not path:
return
self.guesser.save(path)
self.app.dirty = False
def load(self):
- path = tkFileDialog.askopenfilename()
+ path = tkinter.filedialog.askopenfilename()
if not path:
return
self.guesser.load(path)
@@ -100,11 +100,11 @@
class PoolView(Frame):
self.app.dirty = False
def newPool(self):
- p = tkSimpleDialog.askstring('Create Pool', 'Name for new pool?')
+ p = tkinter.simpledialog.askstring('Create Pool', 'Name for new pool?')
if not p:
return
if p in self.guesser.pools:
- tkMessageBox.showwarning('Bad pool name!', 'Pool %s already exists.' % p)
+ tkinter.messagebox.showwarning('Bad pool name!', 'Pool %s already exists.' % p)
self.guesser.newPool(p)
self.reload()
self.app.poolAdded()
@@ -193,7 +193,7 @@
class Trainer(Frame):
def loadCorpus(self):
- path = tkFileDialog.askdirectory()
+ path = tkinter.filedialog.askdirectory()
if not path:
return
self.loadFileList(path)
@@ -203,10 +203,10 @@
class Trainer(Frame):
def bulkTest(self):
dirs = []
for pool in self.guesser.poolNames():
- path = tkFileDialog.askdirectory()
+ path = tkinter.filedialog.askdirectory()
dirs.append((pool, path))
for pool, path in dirs:
- print pool, path
+ print(pool, path)
def displayList(self):
@@ -253,7 +253,7 @@
class Trainer(Frame):
def quitNow(self):
if self.dirty:
- if tkMessageBox.askyesno("You have unsaved changes!", "Quit without saving?"):
+ if tkinter.messagebox.askyesno("You have unsaved changes!", "Quit without saving?"):
self.quit()
self.quit()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment