Open Side Menu Go to the Top
Register
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013

10-20-2008 , 06:37 PM
Hmmm - thanks for that - I believe not having write access to the error log was the problem I had. Simple fix - change access to the directory

Looking at porting to PHP unless theres any objections?
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 06:47 PM
[quote=denks;6706773Looking at porting to PHP unless theres any objections?[/quote]
is GPL, port away
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 07:10 PM
Quote:
Originally Posted by denks
Looking at porting to PHP unless theres any objections?
Why the hell do you want to do that?
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 07:27 PM
Quote:
Originally Posted by Pomtidom
Why the hell do you want to do that?
Im a PHP coder, I can read enough Python to reverse engineer it however I can't code Python. I like extending programs to do stuff it can't currently do, hence the desire to port. Open source at work
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 08:33 PM
I would strongly recommend to just learn Python. It's really easy if you already know PHP and it's much more powerful.

Plus it would be much more helpful to the current users/developers of fpdb if you just add code in Python.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 08:46 PM
Quote:
In both fpdb and the HUD, the log files that catch the stderr stuff are unbuffered, so you don't need to flush.
I write "calling table discover" before i call the function, then i call it, and in the start of the discover function, i write again. If I don't flush immediatly after each call, NOTHING is output, and the program locks up, and Windows eventually kills it for not responding. If I do flush immediatly after, then it just stops actually working, but it doesn't lock up and go Not Responding.

It's very bizarre, I wonder if I'm doing something that just totally breaks Python, without even knowing it
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-20-2008 , 09:50 PM
Quote:
Originally Posted by ekdikeo
I write "calling table discover" before i call the function, then i call it, and in the start of the discover function, i write again. If I don't flush immediatly after each call, NOTHING is output, and the program locks up, and Windows eventually kills it for not responding. If I do flush immediatly after, then it just stops actually working, but it doesn't lock up and go Not Responding.

It's very bizarre, I wonder if I'm doing something that just totally breaks Python, without even knowing it
sorry I missed you on #fpdb.

Are you using the alpha8 release or something more recent from one of our git repos?
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 01:05 AM
Quote:
Originally Posted by Pomtidom
I would strongly recommend to just learn Python. It's really easy if you already know PHP and it's much more powerful.

Plus it would be much more helpful to the current users/developers of fpdb if you just add code in Python.
Have to agree here. I was about to say the there is no php binding for php, but google appears to disagree.

There is some heavy use of the python range syntax through the code, and some slightly abusive use of list primitive for at least one of the data structures.

Biggest reason not to port yet would be that the code base is moving along and isn't anywhere near feature complete. Keeping pace for the moment as we change our minds might get pretty tedious.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 01:47 AM
Quote:
Originally Posted by ekdikeo
Anyone paying attention on the SourceForge forum?
Oops - i've only been monitoring the help forum and the mailing list.

Fixed now though.

I did some surgery on fpdb_import and callers between Alpha 6 and 8, and i'm in the process of trying to create a HandHistoryConverter class to (at least start to) make adding additional site support easier.

What configuration are you using? I've had some weirdness with Posgres hanging in odd places.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 06:29 AM
Quote:
Originally Posted by Eratosthenes
Hi E.S.--

I have separated the gui and database access in HUD_main into different threads. Accessing the db does not block gui actions, so this should be OK for your multitabling.

I have also made a change to HUD.py to cause stat windows to be hidden when the table main window is minimized. I have turned that feature off in the source, you can turn it back on by changing line 55 in Hud.py

Code:
        self.stacked       = False
to True (I'll stick this in the config file soon.). This code is really simple and seems to be happy in both Linux and Windows.

As usual, this is not in the main release yet, but you can get it from my git repo:
git clone git://git.assembla.com/free_poker_tools.git

I have a plan to do the "new top window" detection that I think will work for X, but not windows--I'm doing some experimenting. If it works, I'll go ahead and put the Linux support in and then see if I can figure out windows.

Let me know how it goes.
Thanks for your work on this. I had assumed that the HUD had low priority, but things seem to be moving fast.

I should say that I will probably not be able to test your new code for a few days; but I will let you know as soon as I have given the new stuff a try.

Good luck with the code for discovering the top window! This will be an enormous improvement. It may be worth my mentioning the method I discovered when I had vague plans to try to add this function myself (plans I quickly abandoned). What I found was that using python-xlib and given a window “w” one can call

Code:
w.query_tree().children
yielding a list of child-windows, on which one can then make the same call again recursively, searching through the tree to find the table that is currently visible (this being the “deepest” window in the tree, essentially). That was as far as I got. I did not get the thing working, but think this method is sound.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 07:10 AM
ok, i'm set to auto-join and lurk on #fpdb whenever i'm logged into freenode, now.

I am making my mods currently on alpha8 ..

What I had done was changed HUD_Main to call a function that I added to Tables, that would search for a specific window by table name, to attach to, if it did not already have an attached window. The moment Python ends up in that function call, it freezes, and Windows gives it the "Not Responding" Tag. Only help I got from #python, was that "nothing you can ever do would cause that". I don't know how to proceed.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 09:52 AM
Quote:
Originally Posted by ekdikeo
ok, i'm set to auto-join and lurk on #fpdb whenever i'm logged into freenode, now.

I am making my mods currently on alpha8 ..

What I had done was changed HUD_Main to call a function that I added to Tables, that would search for a specific window by table name, to attach to, if it did not already have an attached window. The moment Python ends up in that function call, it freezes, and Windows gives it the "Not Responding" Tag. Only help I got from #python, was that "nothing you can ever do would cause that". I don't know how to proceed.
You would probably do better to pull from my git repo. It has some changes to HUD_main.py that are relevant.

When the boys on #python say "nothing you can ever do would cause that" they should add "unless you are multithreading". Both alpha8 and my most recent push use multithreading in HUD_main to read the stdin. It is certainly possible that you have run afoul of that. That is why I was suggesting testing your new function by running Tables.py in standalone. If you just change this bit of code:
Code:
            table_windows = Tables.discover(config)
            for t in table_windows.keys():
                if table_windows[t].name == table_name:
                    create_HUD(new_hand_id, table_windows[t], db_name, table_name, max, poker_game, db_connection, config, stat_dict)
                    break
in read_stdin(), to something like this:
Code:
table = Tables.find(table_name, config)
create_HUD(new_hand_id, table, ...
it should be happy.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 03:42 PM
well, i figured if i just returned the entire tables array from my discover function just like the original discover function did, then i could just replace the call to it with the call to mine, and be good. here's what i did.

hud_main.py
Code:
        table_windows = Tables.discover_table_by_name(config, table_name)
        for t in table_windows.keys():
            if table_windows[t].name == table_name:
                hud_dict[table_name] = Hud.Hud(table_windows[t], max, poker_game, config, db_name)
                hud_dict[table_name].create(new_hand_id, config)
                hud_dict[table_name].update(new_hand_id, db_connection, config)
                break
Tables.py:
Code:
def discover_table_by_name(c, tablename):
    sys.stderr.write("discover_table_by_name("+c+" "+tablename+")\n")
    sys.stderr.flush()
    if os.name == 'posix':
        tables = discover_posix_by_name(c, tablename)
    elif os.name == 'nt':
        tables = discover_nt_by_name(c, tablename)
    elif os.name == 'mac':
        tables = discover_mac_by_name(c, tablename)
    else: tables = { }
    sys.stderr.write("tables="+tables+"\n")
    return(tables)
The code is actually locking up, as far as I can tell, at the first line of my quote from hud_main.py. I threw in a debug sys.stderr.write, which is getting written, but then as soon as it goes to Tables.py, it locks up the whole window.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 05:03 PM
Is this thing working?
Also, is there a website to refer to for updates rather than looking through 600 posts?

Cheers
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 05:14 PM
Quote:
Originally Posted by denks
Im a PHP coder, I can read enough Python to reverse engineer it however I can't code Python. I like extending programs to do stuff it can't currently do, hence the desire to port. Open source at work
Well, you are of course allowed to make a PHP fork (I don't think the word port is appropriate for this) if you use the same license as fpdb, but I agree with the others that its a bad idea. If you make a fork you're gonna spend an immense amount of time re-implementing existing features that could be spent on improving the current fpdb. Also, forking it will of course mean that any improvement to python-fpdb will have to be re-done for php-fpdb and the other way round. If you want to do sth in php it would make more sense to write history converters.
But if you insist can I suggest that you only fork fpdb-main or fpdb-HUD but not both? As mentioned before the two parts are independent, so your code would be an alternative for just one of them, leaving the other part of it "unified".
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 05:26 PM
Does it support cake poker hh?
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 05:44 PM
Quote:
Originally Posted by Sublimemoment
Does it support cake poker hh?
Not yet.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 07:07 PM
Quote:
Originally Posted by ekdikeo
The code is actually locking up, as far as I can tell, at the first line of my quote from hud_main.py. I threw in a debug sys.stderr.write, which is getting written, but then as soon as it goes to Tables.py, it locks up the whole window.
This code looks harmless to me. I usually start isolating bits of code when I get in this spot.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 07:10 PM
Quote:
Originally Posted by Pwoita
Is this thing working?
Also, is there a website to refer to for updates rather than looking through 600 posts?

Cheers
File importing and HUD works for Stars and FullTilt. web site is here.

oh yeah, and there is 1 graph and it supports holdem, omaha, omaha8, stud, stud8, and razz -- NL, PL, and FL, as appropriate.

Last edited by Eratosthenes; 10-21-2008 at 07:23 PM. Reason: added the "oh yeah", part
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 07:40 PM
Quote:
Originally Posted by Eratosthenes
File importing and HUD works for Stars and FullTilt. web site is here.

oh yeah, and there is 1 graph and it supports holdem, omaha, omaha8, stud, stud8, and razz -- NL, PL, and FL, as appropriate.

Cool. Thanks for the quick response.
Any chance this will support UltimateBet any time in the near future?
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 08:14 PM
I am using the new version of Ubuntu, and some of the repositories you need to install don't seem to be on synaptic manager, and I can't go further with the text file instructions because of it

Could anyone give info or link me to info on how to get fpdb on ubuntu, this laptop I am using, is now dodgy with XP, but I would like to use this for poker but keep track on how I am doing.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 10:27 PM
Quote:
Originally Posted by PerryGarl
I am using the new version of Ubuntu, and some of the repositories you need to install don't seem to be on synaptic manager, and I can't go further with the text file instructions because of it.
One of the developers will probably reply shortly, but in the meantime perhaps I can help. I had no trouble installing Fpdb on Ubuntu.

Which packages do you need but can’t find? I think all you need in total are MySQL or PostgresQL, Python and python-gtk2. These should all be in the standard repositories. The graphing function requires extra libraries which I have not myself bothered to install; if they are missing this produces an error message but everything else still works.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 11:13 PM
Quote:
Originally Posted by PerryGarl
I am using the new version of Ubuntu, and some of the repositories you need to install don't seem to be on synaptic manager, and I can't go further with the text file instructions because of it
As E. S. just said, the dependencies are fairly common. If you have the new version of python = version 2.6, then all bets are off--it might take some time for gtk bindings, etc. to be available for 2.6. Check your version of python like this:
Code:
$ python
Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) 
[GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you are not getting the mysql bindings, for example, you might do a search in synaptic for mysql and python--I don't remember how to do that and don't have a Ubuntu system handy.
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-21-2008 , 11:20 PM
Quote:
Originally Posted by PerryGarl
I am using the new version of Ubuntu, and some of the repositories you need to install don't seem to be on synaptic manager, and I can't go further with the text file instructions because of it

Could anyone give info or link me to info on how to get fpdb on ubuntu, this laptop I am using, is now dodgy with XP, but I would like to use this for poker but keep track on how I am doing.
The packages you are looking for (from a command prompt):
sudo apt-get install python-mysqldb
sudo apt-get install python-psycopg2
sudo apt-get install python-gtk2
sudo apt-get install python-matplotlib
sudo apt-get install python-numpy

Last edited by sorrow; 10-21-2008 at 11:30 PM. Reason: Added postgres to list removed sqlite
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote
10-22-2008 , 09:33 AM
Quote:
Originally Posted by Pwoita
Cool. Thanks for the quick response.
Any chance this will support UltimateBet any time in the near future?
Not really, except if someone offers payment for the work required for this support, or if someone implements it and sends us the code. We're also working on possible affiliate arrangements to fund development, we'll publish details in due course (yes, that does mean "don't bother asking" ).
Free, open source poker tracking software: FPDB - (Version 0.40.5) - Nov 14, 2013 Quote

      
m