Merge branch 'master' of git://git.assembla.com/fpdboz.git
This commit is contained in:
commit
d7a27cbf9b
BIN
gfx/fpdb_large_icon.ico
Normal file
BIN
gfx/fpdb_large_icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -193,12 +193,13 @@ class GuiAutoImport (threading.Thread):
|
||||||
self.doAutoImportBool = True
|
self.doAutoImportBool = True
|
||||||
widget.set_label(u' _Stop Autoimport ')
|
widget.set_label(u' _Stop Autoimport ')
|
||||||
if self.pipe_to_hud is None:
|
if self.pipe_to_hud is None:
|
||||||
if os.name == 'nt':
|
if Configuration.FROZEN:
|
||||||
if sys.argv[0] == 'fpdb.exe':
|
path = Configuration.EXEC_PATH
|
||||||
command = 'HUD_main.exe'
|
command = "HUD_main.exe"
|
||||||
else:
|
bs = 0
|
||||||
path = sys.path[0].replace('\\','\\\\')
|
elif os.name == 'nt':
|
||||||
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
|
path = sys.path[0].replace('\\','\\\\')
|
||||||
|
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
|
||||||
bs = 0
|
bs = 0
|
||||||
else:
|
else:
|
||||||
command = os.path.join(sys.path[0], 'HUD_main.py')
|
command = os.path.join(sys.path[0], 'HUD_main.py')
|
||||||
|
@ -206,6 +207,7 @@ class GuiAutoImport (threading.Thread):
|
||||||
bs = 1
|
bs = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
print "opening pipe to HUD"
|
||||||
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
|
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
#In the "official" distribution you can find the license in
|
#In the "official" distribution you can find the license in
|
||||||
#agpl-3.0.txt in the docs folder of the package.
|
#agpl-3.0.txt in the docs folder of the package.
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
# http://docs.python.org/library/optparse.html
|
||||||
|
|
||||||
def fpdb_options():
|
def fpdb_options():
|
||||||
|
|
||||||
|
@ -41,6 +41,14 @@ def fpdb_options():
|
||||||
parser.add_option("-k", "--konverter",
|
parser.add_option("-k", "--konverter",
|
||||||
dest="hhc", default="PokerStarsToFpdb",
|
dest="hhc", default="PokerStarsToFpdb",
|
||||||
help="Module name for Hand History Converter")
|
help="Module name for Hand History Converter")
|
||||||
|
parser.add_option("-l", "--logging",
|
||||||
|
dest = "log_level",
|
||||||
|
choices = ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL', 'EMPTY'),
|
||||||
|
help = "Error logging level. (DEBUG, INFO, WARNING, ERROR, CRITICAL, EMPTY)",
|
||||||
|
default = 'EMPTY')
|
||||||
|
parser.add_option("-v", "--version", action = "store_true",
|
||||||
|
help = "Print version information and exit.")
|
||||||
|
|
||||||
(options, argv) = parser.parse_args()
|
(options, argv) = parser.parse_args()
|
||||||
return (options, argv)
|
return (options, argv)
|
||||||
|
|
||||||
|
|
|
@ -245,8 +245,20 @@ def saw_f(stat_dict, player):
|
||||||
def n(stat_dict, player):
|
def n(stat_dict, player):
|
||||||
""" Number of hands played."""
|
""" Number of hands played."""
|
||||||
try:
|
try:
|
||||||
|
# If sample is large enough, use X.Yk notation instead
|
||||||
|
_n = stat_dict[player]['n']
|
||||||
|
fmt = '%d' % _n
|
||||||
|
if _n >= 1000:
|
||||||
|
k = _n / 1000
|
||||||
|
c = _n % 1000
|
||||||
|
_c = float(c) / 100.0
|
||||||
|
d = int(round(_c))
|
||||||
|
if d == 10:
|
||||||
|
k += 1
|
||||||
|
d = 0
|
||||||
|
fmt = '%d.%dk' % (k, d)
|
||||||
return (stat_dict[player]['n'],
|
return (stat_dict[player]['n'],
|
||||||
'%d' % (stat_dict[player]['n']),
|
'%s' % fmt,
|
||||||
'n=%d' % (stat_dict[player]['n']),
|
'n=%d' % (stat_dict[player]['n']),
|
||||||
'n=%d' % (stat_dict[player]['n']),
|
'n=%d' % (stat_dict[player]['n']),
|
||||||
'(%d)' % (stat_dict[player]['n']),
|
'(%d)' % (stat_dict[player]['n']),
|
||||||
|
|
|
@ -100,7 +100,7 @@ setup(
|
||||||
description = 'Free Poker DataBase',
|
description = 'Free Poker DataBase',
|
||||||
version = '0.12',
|
version = '0.12',
|
||||||
|
|
||||||
console = [ {'script': 'fpdb.py', },
|
console = [ {'script': 'fpdb.py', "icon_resources": [(1, "../gfx/fpdb_large_icon.ico")]},
|
||||||
{'script': 'HUD_main.py', },
|
{'script': 'HUD_main.py', },
|
||||||
{'script': 'Configuration.py', }
|
{'script': 'Configuration.py', }
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user