Revert "Modified hhc & fpdb_import so gtk & pygtk are imported only if import is run from the"
This reverts commit 64f46181fa
.
This commit is contained in:
parent
94dc683281
commit
867c547ca0
|
@ -50,6 +50,8 @@ import Hand
|
||||||
from Exceptions import FpdbParseError
|
from Exceptions import FpdbParseError
|
||||||
import Configuration
|
import Configuration
|
||||||
|
|
||||||
|
import pygtk
|
||||||
|
import gtk
|
||||||
|
|
||||||
class HandHistoryConverter():
|
class HandHistoryConverter():
|
||||||
|
|
||||||
|
@ -126,6 +128,9 @@ If in follow mode, wait for more data to turn up.
|
||||||
Otherwise, finish at EOF.
|
Otherwise, finish at EOF.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
while gtk.events_pending():
|
||||||
|
gtk.main_iteration(False)
|
||||||
|
|
||||||
starttime = time.time()
|
starttime = time.time()
|
||||||
if not self.sanityCheck():
|
if not self.sanityCheck():
|
||||||
log.warning(_("Failed sanity check"))
|
log.warning(_("Failed sanity check"))
|
||||||
|
@ -178,11 +183,6 @@ Otherwise, finish at EOF.
|
||||||
if self.out_fh != sys.stdout:
|
if self.out_fh != sys.stdout:
|
||||||
self.out_fh.close()
|
self.out_fh.close()
|
||||||
|
|
||||||
def progressNotify(self):
|
|
||||||
"A callback to the interface while events are pending"
|
|
||||||
import gtk, pygtk
|
|
||||||
while gtk.events_pending():
|
|
||||||
gtk.main_iteration(False)
|
|
||||||
|
|
||||||
def tailHands(self):
|
def tailHands(self):
|
||||||
"""Generator of handTexts from a tailed file:
|
"""Generator of handTexts from a tailed file:
|
||||||
|
|
|
@ -35,6 +35,9 @@ import logging
|
||||||
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
|
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
|
||||||
log = logging.getLogger("importer")
|
log = logging.getLogger("importer")
|
||||||
|
|
||||||
|
import pygtk
|
||||||
|
import gtk
|
||||||
|
|
||||||
# fpdb/FreePokerTools modules
|
# fpdb/FreePokerTools modules
|
||||||
import Database
|
import Database
|
||||||
import Configuration
|
import Configuration
|
||||||
|
@ -258,7 +261,6 @@ class Importer:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
print _("waiting for writers to finish ...")
|
print _("waiting for writers to finish ...")
|
||||||
import gtk, pygtk
|
|
||||||
#for t in threading.enumerate():
|
#for t in threading.enumerate():
|
||||||
# print " "+str(t)
|
# print " "+str(t)
|
||||||
#self.writeq.join()
|
#self.writeq.join()
|
||||||
|
@ -455,7 +457,6 @@ class Importer:
|
||||||
self.pos_in_file[file] = 0
|
self.pos_in_file[file] = 0
|
||||||
hhc = obj( self.config, in_path = file, index = idx, starsArchive = self.settings['starsArchive'], ftpArchive = self.settings['ftpArchive'], sitename = site )
|
hhc = obj( self.config, in_path = file, index = idx, starsArchive = self.settings['starsArchive'], ftpArchive = self.settings['ftpArchive'], sitename = site )
|
||||||
if hhc.getStatus():
|
if hhc.getStatus():
|
||||||
if self.caller: hhc.progressNotify()
|
|
||||||
handlist = hhc.getProcessedHands()
|
handlist = hhc.getProcessedHands()
|
||||||
self.pos_in_file[file] = hhc.getLastCharacterRead()
|
self.pos_in_file[file] = hhc.getLastCharacterRead()
|
||||||
to_hud = []
|
to_hud = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user