2620: GEPS 031: Python 3 support - 3.2
This does patch updates Gramps to the 3.2 syntax, it does not yet mean Gramps works with python 3.2 Expect next day commits to fix further issues, but this is the main 2to3 tool created patch changed where needed to have python 2.7 work. Specific issues might be: 1. next has been changed, must be checked 2. new division as on the wiki page listed is to do 3. ... svn: r20634
This commit is contained in:
@@ -29,6 +29,8 @@ The User class provides basic interaction with the user.
|
||||
# Python Modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@@ -75,7 +77,7 @@ class User(User):
|
||||
@type steps: int
|
||||
@returns: none
|
||||
"""
|
||||
print message
|
||||
print(message)
|
||||
self.steps = steps
|
||||
self.current_step = 0;
|
||||
if self.steps == 0:
|
||||
@@ -140,7 +142,7 @@ class User(User):
|
||||
@type warning: str
|
||||
@returns: none
|
||||
"""
|
||||
print "%s %s" % (title, warning)
|
||||
print("%s %s" % (title, warning))
|
||||
|
||||
def notify_error(self, title, error=""):
|
||||
"""
|
||||
@@ -155,7 +157,7 @@ class User(User):
|
||||
if self.error_function:
|
||||
self.error_function(title, error)
|
||||
else:
|
||||
print "%s %s" % (title, error)
|
||||
print("%s %s" % (title, error))
|
||||
|
||||
def notify_db_error(self, error):
|
||||
"""
|
||||
@@ -176,5 +178,5 @@ class User(User):
|
||||
"""
|
||||
Displays information to the CLI
|
||||
"""
|
||||
print msg1
|
||||
print infotext
|
||||
print(msg1)
|
||||
print(infotext)
|
||||
|
||||
Reference in New Issue
Block a user