import latest
This commit is contained in:
commit
bb650e81a9
168
pyfpdb/fpdb.py
Executable file → Normal file
168
pyfpdb/fpdb.py
Executable file → Normal file
|
@ -18,7 +18,6 @@
|
|||
import os
|
||||
import sys
|
||||
import re
|
||||
import Queue
|
||||
|
||||
# if path is set to use an old version of python look for a new one:
|
||||
# (does this work in linux?)
|
||||
|
@ -67,14 +66,12 @@ if not options.errorsToConsole:
|
|||
errorFile = open('fpdb-error-log.txt', 'w', 0)
|
||||
sys.stderr = errorFile
|
||||
|
||||
#import logging
|
||||
import logging, logging.config
|
||||
import logging
|
||||
|
||||
try:
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk
|
||||
import pango
|
||||
except:
|
||||
print "Unable to load PYGTK modules required for GUI. Please install PyCairo, PyGObject, and PyGTK from www.pygtk.org."
|
||||
raw_input("Press ENTER to continue.")
|
||||
|
@ -82,27 +79,8 @@ except:
|
|||
|
||||
import interlocks
|
||||
|
||||
# these imports not required in this module, imported here to report version in About dialog
|
||||
try:
|
||||
import matplotlib
|
||||
matplotlib_version = matplotlib.__version__
|
||||
except:
|
||||
matplotlib_version = 'not found'
|
||||
try:
|
||||
import numpy
|
||||
numpy_version = numpy.__version__
|
||||
except:
|
||||
numpy_version = 'not found'
|
||||
try:
|
||||
import sqlite3
|
||||
sqlite3_version = sqlite3.version
|
||||
sqlite_version = sqlite3.sqlite_version
|
||||
except:
|
||||
sqlite3_version = 'not found'
|
||||
sqlite_version = 'not found'
|
||||
|
||||
import GuiPrefs
|
||||
import GuiLogView
|
||||
import GuiBulkImport
|
||||
import GuiPlayerStats
|
||||
import GuiPositionalStats
|
||||
|
@ -118,8 +96,6 @@ import Exceptions
|
|||
|
||||
VERSION = "0.12"
|
||||
|
||||
log = Configuration.get_logger("logging.conf", "fpdb")
|
||||
|
||||
class fpdb:
|
||||
def tab_clicked(self, widget, tab_name):
|
||||
"""called when a tab button is clicked to activate that tab"""
|
||||
|
@ -132,12 +108,12 @@ class fpdb:
|
|||
|
||||
def add_tab(self, new_page, new_tab_name):
|
||||
"""adds a tab, namely creates the button and displays it and appends all the relevant arrays"""
|
||||
for name in self.nb_tab_names: #todo: check this is valid
|
||||
for name in self.nb_tabs: #todo: check this is valid
|
||||
if name == new_tab_name:
|
||||
return # if tab already exists, just go to it
|
||||
|
||||
used_before = False
|
||||
for i, name in enumerate(self.tab_names):
|
||||
for i, name in enumerate(self.tab_names): #todo: check this is valid
|
||||
if name == new_tab_name:
|
||||
used_before = True
|
||||
event_box = self.tabs[i]
|
||||
|
@ -153,13 +129,13 @@ class fpdb:
|
|||
|
||||
#self.nb.append_page(new_page, gtk.Label(new_tab_name))
|
||||
self.nb.append_page(page, event_box)
|
||||
self.nb_tab_names.append(new_tab_name)
|
||||
self.nb_tabs.append(new_tab_name)
|
||||
page.show()
|
||||
|
||||
def display_tab(self, new_tab_name):
|
||||
"""displays the indicated tab"""
|
||||
tab_no = -1
|
||||
for i, name in enumerate(self.nb_tab_names):
|
||||
for i, name in enumerate(self.nb_tabs):
|
||||
if new_tab_name == name:
|
||||
tab_no = i
|
||||
break
|
||||
|
@ -210,13 +186,13 @@ class fpdb:
|
|||
(nb, text) = data
|
||||
page = -1
|
||||
#print "\n remove_tab: start", text
|
||||
for i, tab in enumerate(self.nb_tab_names):
|
||||
for i, tab in enumerate(self.nb_tabs):
|
||||
if text == tab:
|
||||
page = i
|
||||
#print " page =", page
|
||||
if page >= 0 and page < self.nb.get_n_pages():
|
||||
#print " removing page", page
|
||||
del self.nb_tab_names[page]
|
||||
del self.nb_tabs[page]
|
||||
nb.remove_page(page)
|
||||
# Need to refresh the widget --
|
||||
# This forces the widget to redraw itself.
|
||||
|
@ -237,42 +213,10 @@ class fpdb:
|
|||
dia.set_comments("GTK AboutDialog comments here")
|
||||
dia.set_license("GPL v3")
|
||||
dia.set_website("http://fpdb.sourceforge.net/")
|
||||
dia.set_authors(['Steffen', 'Eratosthenes', 's0rrow',
|
||||
'EricBlade', '_mt', 'sqlcoder', 'Bostik', 'and others'])
|
||||
dia.set_authors("Steffen, Eratosthenes, s0rrow, EricBlade, _mt, sqlcoder, Bostik, and others")
|
||||
dia.set_program_name("Free Poker Database (FPDB)")
|
||||
|
||||
db_version = ""
|
||||
#if self.db is not None:
|
||||
# db_version = self.db.get_version()
|
||||
nums = [ ('Operating System', os.name)
|
||||
, ('Python', sys.version[0:3])
|
||||
, ('GTK+', '.'.join([str(x) for x in gtk.gtk_version]))
|
||||
, ('PyGTK', '.'.join([str(x) for x in gtk.pygtk_version]))
|
||||
, ('matplotlib', matplotlib_version)
|
||||
, ('numpy', numpy_version)
|
||||
, ('sqlite3', sqlite3_version)
|
||||
, ('sqlite', sqlite_version)
|
||||
, ('database', self.settings['db-server'] + db_version)
|
||||
]
|
||||
versions = gtk.TextBuffer()
|
||||
w = 20 # width used for module names and version numbers
|
||||
versions.set_text( '\n'.join( [x[0].rjust(w)+' '+ x[1].ljust(w) for x in nums] ) )
|
||||
view = gtk.TextView(versions)
|
||||
view.set_editable(False)
|
||||
view.set_justification(gtk.JUSTIFY_CENTER)
|
||||
view.modify_font(pango.FontDescription('monospace 10'))
|
||||
view.show()
|
||||
dia.vbox.pack_end(view, True, True, 2)
|
||||
l = gtk.Label('Version Information:')
|
||||
l.set_alignment(0.5, 0.5)
|
||||
l.show()
|
||||
dia.vbox.pack_end(l, True, True, 2)
|
||||
|
||||
dia.run()
|
||||
dia.destroy()
|
||||
log.debug("Threads: ")
|
||||
for t in self.threads:
|
||||
log.debug("........." + str(t.__class__))
|
||||
|
||||
def dia_preferences(self, widget, data=None):
|
||||
dia = gtk.Dialog("Preferences",
|
||||
|
@ -488,53 +432,6 @@ class fpdb:
|
|||
|
||||
self.release_global_lock()
|
||||
|
||||
def dia_logs(self, widget, data=None):
|
||||
"""opens the log viewer window"""
|
||||
|
||||
#lock_set = False
|
||||
#if self.obtain_global_lock():
|
||||
# lock_set = True
|
||||
|
||||
# remove members from self.threads if close messages received
|
||||
self.process_close_messages()
|
||||
|
||||
viewer = None
|
||||
for i, t in enumerate(self.threads):
|
||||
if str(t.__class__) == 'GuiLogView.GuiLogView':
|
||||
viewer = t
|
||||
break
|
||||
|
||||
if viewer is None:
|
||||
#print "creating new log viewer"
|
||||
new_thread = GuiLogView.GuiLogView(self.config, self.window, self.closeq)
|
||||
self.threads.append(new_thread)
|
||||
else:
|
||||
#print "showing existing log viewer"
|
||||
viewer.get_dialog().present()
|
||||
|
||||
#if lock_set:
|
||||
# self.release_global_lock()
|
||||
|
||||
def addLogText(self, text):
|
||||
end_iter = self.logbuffer.get_end_iter()
|
||||
self.logbuffer.insert(end_iter, text)
|
||||
self.logview.scroll_to_mark(self.logbuffer.get_insert(), 0)
|
||||
|
||||
|
||||
def process_close_messages(self):
|
||||
# check for close messages
|
||||
try:
|
||||
while True:
|
||||
name = self.closeq.get(False)
|
||||
for i, t in enumerate(self.threads):
|
||||
if str(t.__class__) == str(name):
|
||||
# thread has ended so remove from list:
|
||||
del self.threads[i]
|
||||
break
|
||||
except Queue.Empty:
|
||||
# no close messages on queue, do nothing
|
||||
pass
|
||||
|
||||
def __calendar_dialog(self, widget, entry):
|
||||
self.dia_confirm.set_modal(False)
|
||||
d = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||
|
@ -637,7 +534,6 @@ class fpdb:
|
|||
</menu>
|
||||
<menu action="help">
|
||||
<menuitem action="Abbrev"/>
|
||||
<menuitem action="Logs"/>
|
||||
<separator/>
|
||||
<menuitem action="About"/>
|
||||
<menuitem action="License"/>
|
||||
|
@ -679,7 +575,6 @@ class fpdb:
|
|||
('stats', None, '_Statistics (todo)', None, 'View Database Statistics', self.dia_database_stats),
|
||||
('help', None, '_Help'),
|
||||
('Abbrev', None, '_Abbrevations (todo)', None, 'List of Abbrevations', self.tab_abbreviations),
|
||||
('Logs', None, '_Log Messages', None, 'Log and Debug Messages', self.dia_logs),
|
||||
('About', None, 'A_bout', None, 'About the program', self.dia_about),
|
||||
('License', None, '_License and Copying (todo)', None, 'License and Copying', self.dia_licensing),
|
||||
])
|
||||
|
@ -709,26 +604,19 @@ class fpdb:
|
|||
self.settings.update(self.config.get_import_parameters())
|
||||
self.settings.update(self.config.get_default_paths())
|
||||
|
||||
if self.db is not None and self.db.connected:
|
||||
if self.db is not None and self.db.fdb is not None:
|
||||
self.db.disconnect()
|
||||
|
||||
self.sql = SQL.Sql(db_server = self.settings['db-server'])
|
||||
err_msg = None
|
||||
try:
|
||||
self.db = Database.Database(self.config, sql = self.sql)
|
||||
except Exceptions.FpdbMySQLAccessDenied:
|
||||
err_msg = "MySQL Server reports: Access denied. Are your permissions set correctly?"
|
||||
self.warning_box("MySQL Server reports: Access denied. Are your permissions set correctly?")
|
||||
exit()
|
||||
except Exceptions.FpdbMySQLNoDatabase:
|
||||
err_msg = "MySQL client reports: 2002 or 2003 error. Unable to connect - " \
|
||||
+ "Please check that the MySQL service has been started"
|
||||
except Exceptions.FpdbPostgresqlAccessDenied:
|
||||
err_msg = "Postgres Server reports: Access denied. Are your permissions set correctly?"
|
||||
except Exceptions.FpdbPostgresqlNoDatabase:
|
||||
err_msg = "Postgres client reports: Unable to connect - " \
|
||||
+ "Please check that the Postgres service has been started"
|
||||
if err_msg is not None:
|
||||
self.db = None
|
||||
self.warning_box(err_msg)
|
||||
msg = "MySQL client reports: 2002 error. Unable to connect - Please check that the MySQL service has been started"
|
||||
self.warning_box(msg)
|
||||
exit
|
||||
|
||||
# except FpdbMySQLFailedError:
|
||||
# self.warning_box("Unable to connect to MySQL! Is the MySQL server running?!", "FPDB ERROR")
|
||||
|
@ -746,7 +634,7 @@ class fpdb:
|
|||
# print "*** Error: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1])
|
||||
# sys.stderr.write("Failed to connect to %s database with username %s." % (self.settings['db-server'], self.settings['db-user']))
|
||||
|
||||
if self.db is not None and self.db.wrongDbVersion:
|
||||
if self.db.wrongDbVersion:
|
||||
diaDbVersionWarning = gtk.Dialog(title="Strong Warning - Invalid database version", parent=None, flags=0, buttons=(gtk.STOCK_OK,gtk.RESPONSE_OK))
|
||||
|
||||
label = gtk.Label("An invalid DB version or missing tables have been detected.")
|
||||
|
@ -765,15 +653,14 @@ class fpdb:
|
|||
diaDbVersionWarning.destroy()
|
||||
|
||||
if self.status_bar is None:
|
||||
self.status_bar = gtk.Label("")
|
||||
self.status_bar = gtk.Label("Status: Connected to %s database named %s on host %s"%(self.db.get_backend_name(),self.db.database, self.db.host))
|
||||
self.main_vbox.pack_end(self.status_bar, False, True, 0)
|
||||
self.status_bar.show()
|
||||
else:
|
||||
self.status_bar.set_text("Status: Connected to %s database named %s on host %s" % (self.db.get_backend_name(),self.db.database, self.db.host))
|
||||
|
||||
if self.db is not None and self.db.connected:
|
||||
self.status_bar.set_text("Status: Connected to %s database named %s on host %s"
|
||||
% (self.db.get_backend_name(),self.db.database, self.db.host))
|
||||
# rollback to make sure any locks are cleared:
|
||||
self.db.rollback()
|
||||
# Database connected to successfully, load queries to pass on to other classes
|
||||
self.db.rollback()
|
||||
|
||||
self.validate_config()
|
||||
|
||||
|
@ -794,8 +681,7 @@ class fpdb:
|
|||
# TODO: can we get some / all of the stuff done in this function to execute on any kind of abort?
|
||||
print "Quitting normally"
|
||||
# TODO: check if current settings differ from profile, if so offer to save or abort
|
||||
if self.db is not None and self.db.connected:
|
||||
self.db.disconnect()
|
||||
self.db.disconnect()
|
||||
self.statusIcon.set_visible(False)
|
||||
gtk.main_quit()
|
||||
|
||||
|
@ -862,6 +748,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
|
|||
self.add_and_display_tab(gv_tab, "Graphs")
|
||||
|
||||
def __init__(self):
|
||||
self.threads = []
|
||||
# no more than 1 process can this lock at a time:
|
||||
self.lock = interlocks.InterProcessLock(name="fpdb_global_lock")
|
||||
self.db = None
|
||||
|
@ -885,17 +772,14 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
|
|||
menubar.show()
|
||||
#done menubar
|
||||
|
||||
self.threads = [] # objects used by tabs - no need for threads, gtk handles it
|
||||
self.closeq = Queue.Queue(20) # used to signal ending of a thread (only logviewer for now)
|
||||
|
||||
self.nb = gtk.Notebook()
|
||||
self.nb.set_show_tabs(True)
|
||||
self.nb.show()
|
||||
self.main_vbox.pack_start(self.nb, True, True, 0)
|
||||
self.tabs=[] # the event_boxes forming the actual tabs
|
||||
self.tab_names=[] # names of tabs used since program started, not removed if tab is closed
|
||||
self.pages=[] # the contents of the page, not removed if tab is closed
|
||||
self.nb_tab_names=[] # list of tab names currently displayed in notebook
|
||||
self.pages=[]
|
||||
self.tabs=[]
|
||||
self.tab_names=[]
|
||||
self.nb_tabs=[]
|
||||
|
||||
self.tab_main_help(None, None)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,96 +1,96 @@
|
|||
PokerStars Game #35874676388: 7 Card Stud Hi/Lo Limit ($0.04/$0.08 USD) - 2009/11/26 10:27:46 ET
|
||||
Table 'Dawn II' 8-max
|
||||
Seat 1: u.pressure ($11.17 in chips)
|
||||
Seat 2: 123smoothie ($0.99 in chips)
|
||||
Seat 3: gashpor ($1.40 in chips)
|
||||
Seat 4: denny501 ($0.71 in chips)
|
||||
Seat 5: s0rrow ($1.52 in chips)
|
||||
Seat 6: TomSludge ($1.58 in chips)
|
||||
Seat 7: Soroka69 ($0.83 in chips)
|
||||
Seat 8: rdiezchang ($2.05 in chips)
|
||||
u.pressure: posts the ante $0.01
|
||||
123smoothie: posts the ante $0.01
|
||||
gashpor: posts the ante $0.01
|
||||
denny501: posts the ante $0.01
|
||||
s0rrow: posts the ante $0.01
|
||||
TomSludge: posts the ante $0.01
|
||||
Soroka69: posts the ante $0.01
|
||||
rdiezchang: posts the ante $0.01
|
||||
*** 3rd STREET ***
|
||||
Dealt to u.pressure [Td]
|
||||
Dealt to 123smoothie [4c]
|
||||
Dealt to gashpor [5d]
|
||||
Dealt to denny501 [2c]
|
||||
Dealt to s0rrow [7c 3s 5h]
|
||||
Dealt to TomSludge [8s]
|
||||
Dealt to Soroka69 [7d]
|
||||
Dealt to rdiezchang [Ad]
|
||||
denny501: brings in for $0.02
|
||||
s0rrow: calls $0.02
|
||||
TomSludge: folds
|
||||
Soroka69: calls $0.02
|
||||
rdiezchang: calls $0.02
|
||||
u.pressure: folds
|
||||
123smoothie: calls $0.02
|
||||
gashpor: calls $0.02
|
||||
*** 4th STREET ***
|
||||
Dealt to 123smoothie [4c] [3c]
|
||||
Dealt to gashpor [5d] [Qd]
|
||||
Dealt to denny501 [2c] [7s]
|
||||
Dealt to s0rrow [7c 3s 5h] [Qc]
|
||||
Dealt to Soroka69 [7d] [5s]
|
||||
Dealt to rdiezchang [Ad] [Js]
|
||||
rdiezchang: checks
|
||||
123smoothie: checks
|
||||
gashpor: checks
|
||||
denny501: folds
|
||||
denny501 leaves the table
|
||||
s0rrow: checks
|
||||
Soroka69: checks
|
||||
*** 5th STREET ***
|
||||
Dealt to 123smoothie [4c 3c] [9s]
|
||||
Dealt to gashpor [5d Qd] [Jd]
|
||||
Dealt to s0rrow [7c 3s 5h Qc] [Kc]
|
||||
Dealt to Soroka69 [7d 5s] [5c]
|
||||
Dealt to rdiezchang [Ad Js] [Ts]
|
||||
LainaRahat joins the table at seat #4
|
||||
Soroka69: checks
|
||||
rdiezchang: checks
|
||||
123smoothie: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: calls $0.08
|
||||
rdiezchang: folds
|
||||
123smoothie: folds
|
||||
*** 6th STREET ***
|
||||
Dealt to gashpor [5d Qd Jd] [9d]
|
||||
Dealt to s0rrow [7c 3s 5h Qc Kc] [6d]
|
||||
Dealt to Soroka69 [7d 5s 5c] [2s]
|
||||
Soroka69: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: calls $0.08
|
||||
*** RIVER ***
|
||||
Dealt to s0rrow [7c 3s 5h Qc Kc 6d] [4d]
|
||||
Soroka69: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: folds
|
||||
*** SHOW DOWN ***
|
||||
gashpor: shows [4h 3d 5d Qd Jd 9d 6h] (HI: a flush, Queen high)
|
||||
s0rrow: shows [7c 3s 5h Qc Kc 6d 4d] (HI: a straight, Three to Seven; LO: 7,6,5,4,3)
|
||||
gashpor collected $0.40 from pot
|
||||
s0rrow collected $0.40 from pot
|
||||
*** SUMMARY ***
|
||||
Total pot $0.84 | Rake $0.04
|
||||
Seat 1: u.pressure folded on the 3rd Street (didn't bet)
|
||||
Seat 2: 123smoothie folded on the 5th Street
|
||||
Seat 3: gashpor showed [4h 3d 5d Qd Jd 9d 6h] and won ($0.40) with HI: a flush, Queen high
|
||||
Seat 4: denny501 folded on the 4th Street
|
||||
Seat 5: s0rrow showed [7c 3s 5h Qc Kc 6d 4d] and won ($0.40) with HI: a straight, Three to Seven; LO: 7,6,5,4,3
|
||||
Seat 6: TomSludge folded on the 3rd Street (didn't bet)
|
||||
Seat 7: Soroka69 folded on the River
|
||||
Seat 8: rdiezchang folded on the 5th Street
|
||||
|
||||
|
||||
|
||||
PokerStars Game #35874676388: 7 Card Stud Hi/Lo Limit ($0.04/$0.08 USD) - 2009/11/26 10:27:46 ET
|
||||
Table 'Dawn II' 8-max
|
||||
Seat 1: u.pressure ($11.17 in chips)
|
||||
Seat 2: 123smoothie ($0.99 in chips)
|
||||
Seat 3: gashpor ($1.40 in chips)
|
||||
Seat 4: denny501 ($0.71 in chips)
|
||||
Seat 5: s0rrow ($1.52 in chips)
|
||||
Seat 6: TomSludge ($1.58 in chips)
|
||||
Seat 7: Soroka69 ($0.83 in chips)
|
||||
Seat 8: rdiezchang ($2.05 in chips)
|
||||
u.pressure: posts the ante $0.01
|
||||
123smoothie: posts the ante $0.01
|
||||
gashpor: posts the ante $0.01
|
||||
denny501: posts the ante $0.01
|
||||
s0rrow: posts the ante $0.01
|
||||
TomSludge: posts the ante $0.01
|
||||
Soroka69: posts the ante $0.01
|
||||
rdiezchang: posts the ante $0.01
|
||||
*** 3rd STREET ***
|
||||
Dealt to u.pressure [Td]
|
||||
Dealt to 123smoothie [4c]
|
||||
Dealt to gashpor [5d]
|
||||
Dealt to denny501 [2c]
|
||||
Dealt to s0rrow [7c 3s 5h]
|
||||
Dealt to TomSludge [8s]
|
||||
Dealt to Soroka69 [7d]
|
||||
Dealt to rdiezchang [Ad]
|
||||
denny501: brings in for $0.02
|
||||
s0rrow: calls $0.02
|
||||
TomSludge: folds
|
||||
Soroka69: calls $0.02
|
||||
rdiezchang: calls $0.02
|
||||
u.pressure: folds
|
||||
123smoothie: calls $0.02
|
||||
gashpor: calls $0.02
|
||||
*** 4th STREET ***
|
||||
Dealt to 123smoothie [4c] [3c]
|
||||
Dealt to gashpor [5d] [Qd]
|
||||
Dealt to denny501 [2c] [7s]
|
||||
Dealt to s0rrow [7c 3s 5h] [Qc]
|
||||
Dealt to Soroka69 [7d] [5s]
|
||||
Dealt to rdiezchang [Ad] [Js]
|
||||
rdiezchang: checks
|
||||
123smoothie: checks
|
||||
gashpor: checks
|
||||
denny501: folds
|
||||
denny501 leaves the table
|
||||
s0rrow: checks
|
||||
Soroka69: checks
|
||||
*** 5th STREET ***
|
||||
Dealt to 123smoothie [4c 3c] [9s]
|
||||
Dealt to gashpor [5d Qd] [Jd]
|
||||
Dealt to s0rrow [7c 3s 5h Qc] [Kc]
|
||||
Dealt to Soroka69 [7d 5s] [5c]
|
||||
Dealt to rdiezchang [Ad Js] [Ts]
|
||||
LainaRahat joins the table at seat #4
|
||||
Soroka69: checks
|
||||
rdiezchang: checks
|
||||
123smoothie: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: calls $0.08
|
||||
rdiezchang: folds
|
||||
123smoothie: folds
|
||||
*** 6th STREET ***
|
||||
Dealt to gashpor [5d Qd Jd] [9d]
|
||||
Dealt to s0rrow [7c 3s 5h Qc Kc] [6d]
|
||||
Dealt to Soroka69 [7d 5s 5c] [2s]
|
||||
Soroka69: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: calls $0.08
|
||||
*** RIVER ***
|
||||
Dealt to s0rrow [7c 3s 5h Qc Kc 6d] [4d]
|
||||
Soroka69: checks
|
||||
gashpor: bets $0.08
|
||||
s0rrow: calls $0.08
|
||||
Soroka69: folds
|
||||
*** SHOW DOWN ***
|
||||
gashpor: shows [4h 3d 5d Qd Jd 9d 6h] (HI: a flush, Queen high)
|
||||
s0rrow: shows [7c 3s 5h Qc Kc 6d 4d] (HI: a straight, Three to Seven; LO: 7,6,5,4,3)
|
||||
gashpor collected $0.40 from pot
|
||||
s0rrow collected $0.40 from pot
|
||||
*** SUMMARY ***
|
||||
Total pot $0.84 | Rake $0.04
|
||||
Seat 1: u.pressure folded on the 3rd Street (didn't bet)
|
||||
Seat 2: 123smoothie folded on the 5th Street
|
||||
Seat 3: gashpor showed [4h 3d 5d Qd Jd 9d 6h] and won ($0.40) with HI: a flush, Queen high
|
||||
Seat 4: denny501 folded on the 4th Street
|
||||
Seat 5: s0rrow showed [7c 3s 5h Qc Kc 6d 4d] and won ($0.40) with HI: a straight, Three to Seven; LO: 7,6,5,4,3
|
||||
Seat 6: TomSludge folded on the 3rd Street (didn't bet)
|
||||
Seat 7: Soroka69 folded on the River
|
||||
Seat 8: rdiezchang folded on the 5th Street
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
#!/usr/bin/env python
|
||||
"""test1.py
|
||||
|
||||
Test if python is working.
|
||||
"""
|
||||
# Copyright 2008, Ray E. Barker
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
########################################################################
|
||||
|
||||
import sys
|
||||
|
||||
print "\npython is working!"
|
||||
print "\npress return to finish"
|
||||
|
||||
sys.stdin.readline()
|
||||
#!/usr/bin/env python
|
||||
"""test1.py
|
||||
|
||||
Test if python is working.
|
||||
"""
|
||||
# Copyright 2008, Ray E. Barker
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
########################################################################
|
||||
|
||||
import sys
|
||||
|
||||
print "\npython is working!"
|
||||
print "\npress return to finish"
|
||||
|
||||
sys.stdin.readline()
|
||||
|
|
114
pyfpdb/test2.py
114
pyfpdb/test2.py
|
@ -1,57 +1,57 @@
|
|||
#!/usr/bin/env python
|
||||
"""test2.py
|
||||
|
||||
Test if gtk is working.
|
||||
"""
|
||||
# Copyright 2008, Ray E. Barker
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
########################################################################
|
||||
|
||||
import sys
|
||||
|
||||
try:
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk
|
||||
|
||||
|
||||
win = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||
win.set_title("Test GTK")
|
||||
win.set_border_width(1)
|
||||
win.set_default_size(600, 500)
|
||||
win.set_resizable(True)
|
||||
#win.show()
|
||||
|
||||
dia = gtk.Dialog("Test GTK",
|
||||
win,
|
||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
(gtk.STOCK_CLOSE, gtk.RESPONSE_OK))
|
||||
dia.set_default_size(500, 300)
|
||||
|
||||
l = gtk.Label("GTK is working!")
|
||||
dia.vbox.add(l)
|
||||
l.show()
|
||||
|
||||
response = dia.run()
|
||||
if response == gtk.RESPONSE_ACCEPT:
|
||||
pass
|
||||
dia.destroy()
|
||||
|
||||
except:
|
||||
print "\nError:", sys.exc_info()
|
||||
print "\npress return to finish"
|
||||
sys.stdin.readline()
|
||||
#!/usr/bin/env python
|
||||
"""test2.py
|
||||
|
||||
Test if gtk is working.
|
||||
"""
|
||||
# Copyright 2008, Ray E. Barker
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
########################################################################
|
||||
|
||||
import sys
|
||||
|
||||
try:
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk
|
||||
|
||||
|
||||
win = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||
win.set_title("Test GTK")
|
||||
win.set_border_width(1)
|
||||
win.set_default_size(600, 500)
|
||||
win.set_resizable(True)
|
||||
#win.show()
|
||||
|
||||
dia = gtk.Dialog("Test GTK",
|
||||
win,
|
||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
(gtk.STOCK_CLOSE, gtk.RESPONSE_OK))
|
||||
dia.set_default_size(500, 300)
|
||||
|
||||
l = gtk.Label("GTK is working!")
|
||||
dia.vbox.add(l)
|
||||
l.show()
|
||||
|
||||
response = dia.run()
|
||||
if response == gtk.RESPONSE_ACCEPT:
|
||||
pass
|
||||
dia.destroy()
|
||||
|
||||
except:
|
||||
print "\nError:", sys.exc_info()
|
||||
print "\npress return to finish"
|
||||
sys.stdin.readline()
|
||||
|
|
Loading…
Reference in New Issue
Block a user