Official GHost++ Home - Codelain.com
May 21, 2013, 09:50:08 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Poll
Question: Would you like to see a Python Plugin System in GHost++?
Yes - 77 (90.6%)
No - 8 (9.4%)
Total Voters: 80

Pages: 1 ... 10 11 [12] 13 14
  Print  
Author Topic: pyGHost++ (scriptable ghost)  (Read 21279 times)
0 Members and 1 Guest are viewing this topic.
Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #165 on: September 27, 2010, 11:24:07 AM »

working on the inheritance for the reflection atm. After im finished with that i can release it Smiley
Logged
Official GHost++ Home - Codelain.com
« Reply #165 on: September 27, 2010, 11:24:07 AM »

 Logged
Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #166 on: October 04, 2010, 02:55:12 PM »

inheritance support finished but i have to add "virtual method" support.
Logged
munchj
Initiate

Offline Offline

Posts: 26


View Profile WWW
« Reply #167 on: October 12, 2010, 01:41:37 PM »

up !  Wink

I'd like to move all my hosting bots to pyGhost (when it is ready, no pressure!) in order to be able to easily stream games on whaagtv and add a few other plugins.
Logged

Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #168 on: October 13, 2010, 11:27:00 AM »

hm cuz a python based inheritance (which works this way:
Code:
class BaseClass:
    def Method(self, argument):
        pass

class Class( BaseClass ):
    def Method(self, argument):
        pass

MyObject = Class()
#calling Class's Method:
MyObject.Method()
#calling BaseClass's Method:
BaseClass.Method( MyObject )
) is not possible i have this option for you (based on the above example):
MyObject.BaseClass.Method() #calls BaseClass's Method
MyObject.Method() #calls Class's Method

if this is ok for you guys (cuz it isn't pure python style) i'll implement the inheritance support this way.
   
Logged
munchj
Initiate

Offline Offline

Posts: 26


View Profile WWW
« Reply #169 on: October 13, 2010, 08:04:22 PM »

Well to be honest this looks like a perfectly fine solution  Wink

What we are looking for in a first time is mainly the ability to automatically stream games on whaagtv (+ remote console that we use on our modified ghost version). What is your base version by the way ? 17.1 ?
Logged

Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #170 on: October 14, 2010, 11:54:26 AM »

hm im developing the API without ghost++ atm. I can "apply" the API on the latest ghost existing.
Logged
Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #171 on: October 26, 2010, 03:21:11 PM »

last obstacle determined : enums
The final port has begun today!
Logged
Instinct121
Chief Executive Officer
Distinct Contributor
*
Offline Offline

Posts: 8854


Now on HoN


View Profile WWW
« Reply #172 on: November 02, 2010, 05:33:30 PM »

So is the sourcecode still maintained at http://pyghost.googlecode.com/ ?  It seems as though it hasn't for months, but you're still making changes. :/
Logged

Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #173 on: November 12, 2010, 05:10:58 PM »

@instinct: yep there weren't many changes the last months cuz i was working on the new system (reflection and stuff).
Im finished with the new API (i hope so xD) and im porting the classes now.
I've also done some rework of the host module:
host.registerHandler( "HandlerName", PyFunction[, ExecuteBeforeCppFunction])
ExecuteBeforeCppFunction is optinal: if true, this function will be called before the c++ code itself will be processed. If the function fails or returns true, the c++ function will *NOT* continue and break up here (but it will call all the other python functions registered on ExecuteBeforeCppFunction).
Logged
JiLiZART
Web Design Advisor
Devoted Member
*
Offline Offline

Posts: 299



View Profile WWW
« Reply #174 on: November 14, 2010, 12:45:56 PM »

plz, don't forget about backup your files
Logged

Krauzi
Technical Advisor
Distinct Contributor
*
Offline Offline

Posts: 392


View Profile
« Reply #175 on: November 19, 2010, 08:05:59 AM »

okay the new ghost is finished (currently need testers). I've switched to boost::python for the next versions until i've revised my own API (should be faster than boost::python).

I didnt edit the make file yet, so if you want to test pyGHost++ on linux you have to wait or edit the file yourself.
Ill upload the new version within the next minutes on http://pyghost.googlecode.com

edit: just a info:
host.registerHandler has now an additional argument which will result in calling the python function BEFORE the cpp function. Another effect of this is that the cpp function will *NOT* be handeled if the python function returns True or raises an error (it will continue if you dont return anything or if you return False or None).
In plugins/python/ you can find an example of this
« Last Edit: November 19, 2010, 11:38:20 AM by Krauzi » Logged
PapayaDealer
Distinct Contributor
***
Offline Offline

Posts: 458


High-quality hostbots


View Profile WWW
« Reply #176 on: November 19, 2010, 11:30:28 AM »

very nice!
I will start testing it tomorrow.

good job Cheesy
Logged

High quality GHost++ hosting in Europe: only 4€!
--> click here!
> visit us: Living-BoTs.net


uakf.b
Chief Technical Officer
Distinct Contributor
*
Offline Offline

Posts: 5138



View Profile
« Reply #177 on: November 21, 2010, 03:43:14 PM »

Hey, I compiled the 4.0 version on linux, but I keep getting the error "ImportError: No module named plugins.python. I have the __init__.py in the plugins directory and moved ghost++ to where ghost++.exe was, but it still doesn't work.

Edit: nevermind, I got it working by setting PYTHONPATH to the ghost directory.
Edit2: I attached the makefile I used (just added python and boost_python). Also, in the getmap.py, new dota maps don't have the "Allstars".
Edit3: I made a simple random plugin
« Last Edit: November 22, 2010, 02:07:14 PM by uakf.b » Logged
uakf.b
Chief Technical Officer
Distinct Contributor
*
Offline Offline

Posts: 5138



View Profile
« Reply #178 on: November 22, 2010, 07:50:29 PM »

I made some more plugins for pyGHost++. calc is a simple calculator that supports addition, subtraction, multiplication, division, cosine, sine, tangent, power, and logs (it uses the algorithms here and here). gettime just returns the server time. rickroll randomly selects a line from an input file and outputs it.

For some reason it doesn't work if you just put it in a separate directory like plugins/gettime/. The only way I could get it to work was by putting PLUGINNAME.py inside plugins/python, then editing __init__.py to import PLUGINNAME and calling init() function. I also tried !enableplugin but it didn't seem to do anything.
« Last Edit: November 22, 2010, 08:03:17 PM by uakf.b » Logged
Slademarini
Initiate

Offline Offline

Posts: 1


View Profile
« Reply #179 on: November 23, 2010, 09:04:59 AM »

my pyghost doesnt work


[PYTHON] Traceback (most recent call last):
[PYTHON]   File "D:\pyGHost\plugins\python\test_module.py", line 11, in TestFunc
2
[PYTHON]     raise RuntimeError("Error from TestFunc2")
[PYTHON] RuntimeError: Error from TestFunc2

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

i get this error on startup.
Logged
Pages: 1 ... 10 11 [12] 13 14
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!