mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Ran 2to3 on pysollib/[a-g]*.py
This commit is contained in:
parent
9f8adfe4c8
commit
890a948d8b
2 changed files with 7 additions and 5 deletions
|
@ -31,7 +31,6 @@ import traceback
|
||||||
from pysollib.mygettext import _
|
from pysollib.mygettext import _
|
||||||
|
|
||||||
from gettext import ungettext
|
from gettext import ungettext
|
||||||
from cStringIO import StringIO
|
|
||||||
|
|
||||||
# PySol imports
|
# PySol imports
|
||||||
from pysollib.mfxutil import Pickler, Unpickler, UnpicklingError
|
from pysollib.mfxutil import Pickler, Unpickler, UnpicklingError
|
||||||
|
@ -62,9 +61,12 @@ from pysollib.hint import DefaultHint
|
||||||
from pysollib.help import help_about
|
from pysollib.help import help_about
|
||||||
|
|
||||||
if sys.version_info > (3,):
|
if sys.version_info > (3,):
|
||||||
|
from io import StringIO
|
||||||
basestring = str
|
basestring = str
|
||||||
long = int
|
long = int
|
||||||
xrange = range
|
xrange = range
|
||||||
|
else:
|
||||||
|
from cStringIO import StringIO
|
||||||
|
|
||||||
PLAY_TIME_TIMEOUT = 200
|
PLAY_TIME_TIMEOUT = 200
|
||||||
|
|
||||||
|
@ -825,7 +827,7 @@ class Game:
|
||||||
else:
|
else:
|
||||||
# new group
|
# new group
|
||||||
sg[s] = [s.id]
|
sg[s] = [s.id]
|
||||||
sg = sg.values()
|
sg = list(sg.values())
|
||||||
self.sn_groups = sg
|
self.sn_groups = sg
|
||||||
# print sg
|
# print sg
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ class GameInfo(Struct):
|
||||||
# keyword arguments:
|
# keyword arguments:
|
||||||
si={}, category=0,
|
si={}, category=0,
|
||||||
short_name=None, altnames=(),
|
short_name=None, altnames=(),
|
||||||
suits=range(4), ranks=range(13), trumps=(),
|
suits=list(range(4)), ranks=list(range(13)), trumps=(),
|
||||||
rules_filename=None,
|
rules_filename=None,
|
||||||
):
|
):
|
||||||
#
|
#
|
||||||
|
@ -636,11 +636,11 @@ class GameManager:
|
||||||
|
|
||||||
def getAllGames(self):
|
def getAllGames(self):
|
||||||
# return self.__all_games
|
# return self.__all_games
|
||||||
return self.__games.values()
|
return list(self.__games.values())
|
||||||
|
|
||||||
def getGamesIdSortedById(self):
|
def getGamesIdSortedById(self):
|
||||||
if self.__games_by_id is None:
|
if self.__games_by_id is None:
|
||||||
l = self.__games.keys()
|
l = list(self.__games.keys())
|
||||||
l.sort()
|
l.sort()
|
||||||
self.__games_by_id = tuple(l)
|
self.__games_by_id = tuple(l)
|
||||||
return self.__games_by_id
|
return self.__games_by_id
|
||||||
|
|
Loading…
Add table
Reference in a new issue