From 1bd8419510219be507c4d7f77816ddf11228858f Mon Sep 17 00:00:00 2001 From: eblade Date: Sun, 2 Aug 2009 07:14:31 -0400 Subject: [PATCH 1/3] merge from carl --- pyfpdb/windows_make_bats.py | 94 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/pyfpdb/windows_make_bats.py b/pyfpdb/windows_make_bats.py index e602314f..996e2bc9 100755 --- a/pyfpdb/windows_make_bats.py +++ b/pyfpdb/windows_make_bats.py @@ -1,47 +1,47 @@ - -# create .bat scripts in windows to try out different gtk dirs - -try: - - import os - import sys - import re - - if os.name != 'nt': - print "\nThis script is only for windows\n" - exit() - - dirs = re.split(os.pathsep, os.environ['PATH']) - # remove any trailing / or \ chars from dirs: - dirs = [re.sub('[\\/]$','',p) for p in dirs] - # remove any dirs containing 'python' apart from those ending in 'python25', 'python26' or 'python': - dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I)] - # find gtk dirs: - gtkdirs = [p for p in dirs if re.search('gtk', p, re.I)] - - lines = [ '@echo off\n\n' - , '' - , 'python fpdb.py\n\n' - , 'pause\n\n' - ] - if gtkdirs: - i = 1 - for gpath in gtkdirs: # enumerate converts the \\ into \ - tmpdirs = [p for p in dirs if not re.search('gtk', p, re.I) or p == gpath] - tmppath = ";".join(tmpdirs) - lines[1] = 'PATH=' + tmppath + '\n\n' - bat = open('run_fpdb'+str(i)+'.bat', 'w') - bat.writelines(lines) - bat.close() - i = i + 1 - else: - print "\nno gtk directories found in your path - install gtk or edit the path manually\n" - -except SystemExit: - pass - -except: - print "Error:", str(sys.exc_info()) - pass - -# sys.stdin.readline() + +# create .bat scripts in windows to try out different gtk dirs + +try: + + import os + import sys + import re + + if os.name != 'nt': + print "\nThis script is only for windows\n" + exit() + + dirs = re.split(os.pathsep, os.environ['PATH']) + # remove any trailing / or \ chars from dirs: + dirs = [re.sub('[\\/]$','',p) for p in dirs] + # remove any dirs containing 'python' apart from those ending in 'python25', 'python26' or 'python': + dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I)] + # find gtk dirs: + gtkdirs = [p for p in dirs if re.search('gtk', p, re.I)] + + lines = [ '@echo off\n\n' + , '' + , 'python fpdb.py\n\n' + , 'pause\n\n' + ] + if gtkdirs: + i = 1 + for gpath in gtkdirs: # enumerate converts the \\ into \ + tmpdirs = [p for p in dirs if not re.search('gtk', p, re.I) or p == gpath] + tmppath = ";".join(tmpdirs) + lines[1] = 'PATH=' + tmppath + '\n\n' + bat = open('run_fpdb'+str(i)+'.bat', 'w') + bat.writelines(lines) + bat.close() + i = i + 1 + else: + print "\nno gtk directories found in your path - install gtk or edit the path manually\n" + +except SystemExit: + pass + +except: + print "Error:", str(sys.exc_info()) + pass + +# sys.stdin.readline() From cf3c7276a7f5040a77b68cf53fd0e2f91de664c2 Mon Sep 17 00:00:00 2001 From: eblade Date: Tue, 4 Aug 2009 16:20:14 -0400 Subject: [PATCH 2/3] add bat/py for making an exe. exe errors with "can't find module cairo". no idea how to fix. --- pyfpdb/makeexe.bat | 1 + pyfpdb/makeexe.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 pyfpdb/makeexe.bat create mode 100644 pyfpdb/makeexe.py diff --git a/pyfpdb/makeexe.bat b/pyfpdb/makeexe.bat new file mode 100644 index 00000000..ddcdba7c --- /dev/null +++ b/pyfpdb/makeexe.bat @@ -0,0 +1 @@ +python makeexe.py py2exe diff --git a/pyfpdb/makeexe.py b/pyfpdb/makeexe.py new file mode 100644 index 00000000..01139443 --- /dev/null +++ b/pyfpdb/makeexe.py @@ -0,0 +1,10 @@ +from distutils.core import setup +import py2exe +opts = { + 'py2exe': { + 'includes': "pango,atk,gobject", + } + } + +setup(name='Free Poker Database', version='0.12', console=[{"script":"fpdb.py"}]) + From 91e6783869b47c085cf25311ff93483d109b7115 Mon Sep 17 00:00:00 2001 From: eblade Date: Tue, 4 Aug 2009 21:36:30 -0400 Subject: [PATCH 3/3] GuiBulkImport: bump max thread counter to 32 .. --- pyfpdb/GuiBulkImport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index 3871c4d6..84a8e3bf 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -155,7 +155,7 @@ class GuiBulkImport(): self.lab_threads.set_alignment(1.0, 0.5) # spin button - threads - threads_adj = gtk.Adjustment(value=0, lower=0, upper=10, step_incr=1, page_incr=1, page_size=0) #not sure what upper value should be! + threads_adj = gtk.Adjustment(value=0, lower=0, upper=32, step_incr=1, page_incr=1, page_size=0) #not sure what upper value should be! self.spin_threads = gtk.SpinButton(adjustment=threads_adj, climb_rate=0.0, digits=0) self.table.attach(self.spin_threads, 4, 5, 0, 1, xpadding = 10, ypadding = 0, yoptions=gtk.SHRINK) self.spin_threads.show()