# usage: python one_time_eval.py as8sqdtc
# usage: python one_time_eval.py as8sqdtc 2skskd

from convenience import find_pcts, pr, str2cards
import sys

## argv to strings
hole_cards_str = sys.argv[1]
board_str = ''
if len(sys.argv) > 2:
    board_str = sys.argv[2]

## strings to lists of Card objects
hole_cards = str2cards(hole_cards_str)
board = str2cards(board_str)

## card list to player list-of-lists
assert len(hole_cards) % 2 == 0
n_players = len(hole_cards) / 2
assert n_players > 1
p = []
for i in range(n_players):
    pi = hole_cards[i * 2 : i * 2 + 2]
    pr(pi)
    p.append(pi)

print "Board",
pr(board)
print find_pcts(p[0], p[1], board, iter = 10000)

@@ -30,25 +30,201 @@
 .py 
-as8sqdtc%0A# usage:
+hole_cards %5Bboard_cards%5D%0A# examples:%0A#        python one_time_eval.py as8sqdtc%0A#        python one_time_eval.py as8sqdtc     2skskd%0A#        python one_time_eval.py as8sqdtc3d3c 2skskd%0A#       
  pyt
@@ -252,23 +252,31 @@
 as8sqdtc
+3d3c
  2skskd
+3h5s
 %0A%0Afrom c
@@ -302,16 +302,22 @@
 ind_pcts
+_multi
 , pr, st
@@ -557,16 +557,21 @@
 str)%0A%0A##
+ hole
  card li
@@ -810,20 +810,25 @@
 board)%0Ap
-rint
+ercents =
  find_pc
@@ -833,19 +833,16 @@
 pcts
-(p%5B0%5D, p%5B1%5D
+_multi(p
 , bo
@@ -860,8 +860,46 @@
  10000)%0A
+print %5Bround(x, 4) for x in percents%5D%0A

Add support for multi-way pots.