Author Topic: pychop  (Read 3738 times)

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
pychop
« on: December 14, 2013, 07:14:34 pm »
I was looking at chop++ yesterday or so, and I realized that the latest version was very unstable with many bugs. Also, I wanted a plugin system for my channel bot so that things like trivia and useless but fun commands can be added without either building it into the main code base or including several patch files.

Anyways, I think I've fixed most of the instability issues (mostly memory leaks; there were some minor bugs too), and I've also gotten a few plugins to work well (basically I copied Krauzi's awesome plugin system from pyGHost++ to pychop; I don't know why he discontinued it ):. Trivia plugin reads from http://snapnjacks.com/ database and does trivia. Doesn't save stats yet, maybe never will because I don't think that's important in a trivia plugin since it should just be for fun. I also ported Krauzi's plugin so if you have multiple GHost++ without download option, you can use your channel operator to download maps (assuming it's on same server of course). The plugin is especially nice because it lets you download the latest version of dota.

I haven't really gotten around to adding all of the methods into python because it's kind of boring, but most of the ones you'll ever need to use are already there.

I haven't tested it on Windows, but there's no reason it shouldn't work (in fact it should be more stable on Windows because I think Windows is less careful about accessing memory that's been freed).

I wouldn't have started working on this if the original ChOP++ project were alive, but since it's dead and I wanted make some fixes. As for the goals of this project, currently I just want to make a stable core that gives plugins power to do a lot and several plugins that provide broad functionality. However, I've seen that a lot of users don't want a mysql database or want a console application, so maybe that'll be done too (maybe console somehow through a plugin?????).

Google code link: http://code.google.com/p/pychop/
Original ChOP++ link (doesn't work; they must've ended it for some reason...): http://code.google.com/p/chopplusplus/
pyGHost++ link: http://code.google.com/p/pyghost/

Edit: by the way, I haven't updated README yet, and you should know that you have to run
Code: [Select]
export PYTHONPATH="$PYTHONPATH:."before using it on Linux systems apparently.

Edit2: by the way again, the ChOP++ also has sourceforge link at http://sourceforge.net/projects/chopplusplus/ but website doesn't work and I don't know if you can even access repository.

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #1 on: March 20, 2014, 02:23:30 pm »
hi..
i've successfully compiled the pychop but when i'm trying to execute with ./chop++ i get the following error:



As you can see on the screenshot, i've installed python 2.7, so i tried this: http://www.codelain.com/forum/index.php?topic=18054.15;wap2 but also without success. I received a new error message and after googling it, i updated again on 2.7.. can u help me?

thanks and greets

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #2 on: March 20, 2014, 02:36:41 pm »
Are you using the latest SVN source or did you use one of the download archives?

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #3 on: March 20, 2014, 03:08:44 pm »

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #4 on: March 20, 2014, 04:09:06 pm »
Try checking out the latest SVN.

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #5 on: March 21, 2014, 10:17:46 am »
just tried.. the same error :/

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #6 on: March 21, 2014, 12:06:00 pm »
And you have plugins directory and plugins/pychop directory in your wc3 directory? Both should also have __init__.py.

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #7 on: March 21, 2014, 12:21:55 pm »
y both of it exists

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #8 on: March 21, 2014, 01:43:10 pm »
What OS / distribution is it? Have you tried
Code: [Select]
export PYTHONPATH="$PYTHONPATH:."

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #9 on: March 25, 2014, 03:26:26 pm »
sry that i answer so late..
y i tried exporting the pyton path.. (google helped me) but still the same problem.. i use a version of debian gnu/linux 7 wheezy (edited for cubietruck -> "cubian").

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #10 on: March 26, 2014, 11:12:53 am »
Don't know what it could be then. I have it running fine on Debian.

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #11 on: March 26, 2014, 04:32:03 pm »
ok .. it works now!! :) a friend helped me .. good job and thx for your help!

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: pychop
« Reply #12 on: March 26, 2014, 04:48:12 pm »
ok .. it works now!! :) a friend helped me .. good job and thx for your help!
What solved it? In case someone else has same problem.

Deathknight

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: pychop
« Reply #13 on: March 27, 2014, 02:05:51 pm »
What OS / distribution is it? Have you tried
Code: [Select]
export PYTHONPATH="$PYTHONPATH:."

You were right, this was the solution. I was just too stupid ^^