Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-21-2007, 04:14 PM
Pomtidom Pomtidom is offline
Senior Member
 
Join Date: Sep 2006
Posts: 125
Default Fix for GameTime+ on Everest Poker

Hi,

If anyone here plays on Everest Poker and uses GameTime+ they probably noticed that you have to move the labels around each time you open a new table, because Everest always places you at the front seat no matter what seat you have.

I've created a script to workaround this annoying problem. It's written in Python which you'll need to run the script. Python can be found here: http://www.python.org/download/

What this script does is monitor the HH's Everest Poker produces, converts them to make sure you are always at seat 0 in the handhistory and writes them in a different directory (output_dir) which you can import into PT.

There are 3 settings in this script:
- everest_dir: this is the directory where Everest Poker places the handhistories, this is usually correct by default.
- output_dir: the directory the script outputs the parsed handhistories, make sure this directory exists.
- number_of_players: whether you play headsup (2), shorthanded (6) or fullring (10).

Save the code of the script to a .py file (e.g. ConvertEverest.py) and doubleclick to run it. It will not output anything on screen but will parse the handhistories every 60 seconds. Just let it run. Make sure PT imports the output_dir and not the everest_dir.

Here's the script:
<font class="small">Code:</font><hr /><pre>import os, time, re, xml.dom.minidom, xml.parsers.expat

############################### SETTINGS ###############################

everest_dir = "C:\Program Files\Everest Poker\history\\"
output_dir = "C:\Program Files\Everest Poker\history\processed\\"
number_of_players = 6

############################# / SETTINGS ###############################


def ParseFile( filename ):
in_file = open( everest_dir + filename, 'rb' )
out_file = open( output_dir + filename, 'wb' )
lines = in_file.readlines()
handtext = [ ]
for line in lines:
handtext.append( line )
if '&lt;SESSION' in line:
xmlLine = xml.dom.minidom.parseString( line )
nickname = xmlLine.childNodes[0].getAttribute( 'screenName' )
elif '&lt;HAND' in line:
position = { }
elif '&lt;SEAT' in line:
xmlLine = xml.dom.minidom.parseString( line )
pos = xmlLine.childNodes[0].getAttribute( 'position' )
name = xmlLine.childNodes[0].getAttribute( 'name' )
position[ name ] = pos
elif '&lt;DEALER' in line:
offset = int( position[ nickname ] )
elif '&lt;/HAND&gt;' in line:
for l in handtext:
try:
xmlLine = xml.dom.minidom.parseString( l )
pos = xmlLine.childNodes[0].getAttribute( 'position' )
pos = int(pos)
pos = (pos - offset) % number_of_players
out_file.write( re.sub( 'position="[0-9]+"', 'position="' + str(pos) + '"', l ) )
except (ValueError, xml.parsers.expat.ExpatError):
if '&lt;WIN' in l:
pos = int( l[ 17 ] )
pos = (pos - offset) % number_of_players
l = l[:17] + str(pos) + l[18:]
out_file.write( l )
handtext = [ ]


handled = { }
while True:
files = os.listdir( everest_dir )
for file in files:
if re.match( "^[0-9]+\.txt", file ):
mtime = os.path.getmtime( everest_dir + file )
if file not in handled:
handled[ file ] = 0
if mtime &gt; handled[ file ]:
ParseFile( file )
handled[ file ] = mtime
time.sleep( 60 )</pre><hr />

I have tested this briefly and it seems to work. Any questions/comments/suggestions are welcome.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.