Krauzi
Technical Advisor
Distinct Contributor
Offline
Posts: 392
|
 |
« 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 
|
|
|
|
|
Logged
|
|
|
|
|
Official GHost++ Home - Codelain.com
|
 |
« Reply #165 on: September 27, 2010, 11:24:07 AM » |
|
|
|
|
|
|
Logged
|
|
|
|
Krauzi
Technical Advisor
Distinct Contributor
Offline
Posts: 392
|
 |
« 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
Posts: 26
|
 |
« Reply #167 on: October 12, 2010, 01:41:37 PM » |
|
up !  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
Posts: 392
|
 |
« Reply #168 on: October 13, 2010, 11:27:00 AM » |
|
hm cuz a python based inheritance (which works this way: 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
Posts: 26
|
 |
« Reply #169 on: October 13, 2010, 08:04:22 PM » |
|
Well to be honest this looks like a perfectly fine solution  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
Posts: 392
|
 |
« 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
Posts: 392
|
 |
« 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
Posts: 8854
Now on HoN
|
 |
« 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
Posts: 392
|
 |
« 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
Posts: 299
|
 |
« 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
Posts: 392
|
 |
« 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.comedit: 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
|
 |
« Reply #176 on: November 19, 2010, 11:30:28 AM » |
|
very nice! I will start testing it tomorrow. good job 
|
|
|
|
|
Logged
|
|
|
|
uakf.b
Chief Technical Officer
Distinct Contributor
Offline
Posts: 5138
|
 |
« 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
Posts: 5138
|
 |
« 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
Posts: 1
|
 |
« 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
|
|
|
|
|