[DISCUSSION] Python Development

Discussion in 'General Modification' started by Elphaba, Oct 1, 2003.

Remove all ads!
  1. sweintraub

    sweintraub Member

    Joined:
    Sep 28, 2003
    Messages:
    1
    Likes Received:
    0
    Another python programmer

    Well, I've got the skills (15 yr programming vet, 3+ in python), but not necessarily the time.

    I'll be happy to consider anything that needs done tho.
     
  2. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
    It looks like "python22.dll" is a DLL directly from the Zope corporation, and most likely part of their free Python downloads.

    PyTOEE.dll is "VERY similar" to this DLL. They're the exact same size to begin with. If you do a fc /b on the two files, you'll find they're not that far off from each other. That leads me to believe they modified python22.dll for some reason.
     
  3. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
    Just to add a bit...

    I haven't looked at this too closely yet, and it's probably old hat to people who have used Python as a scripting language to other languages, but this link has some info which should give us an idea how Troika's calling Python from their code.

    One thing that's probably worth doing is trying to find a "debug" version of this DLL which will enable us to at least log what all is being called in the DLL (this DLL has 748 exported functions btw). If that can't be found, a "wrapper" DLL that forwards calls to the original DLL while logging what's being called might come in handy. Of course, writing a wrapper for 748 functions doesn't sound like much fun to me ;).
     
  4. Elphaba

    Elphaba Member

    Joined:
    Oct 1, 2003
    Messages:
    8
    Likes Received:
    0
    zope, huh. fun little webapplication fooey. does anyone have the microsoft sdk installed on their computer?

    you are right, though. more than very similar. seemingly identical.

    grabbing it now. might be able to at least find the exported function names .... but i wouldn't do that because it is against the eula
     
  5. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
    I've got VS.NET 2003 installed, which includes the Platform SDK etc. Need me to run something for you? Looking for a dumpbin /exports?

    PS> This document is handy too. It's a 2.3.2 doc (we're dealing with 2.2.X), but I'm sure a lot of it's the same.
     
  6. Elphaba

    Elphaba Member

    Joined:
    Oct 1, 2003
    Messages:
    8
    Likes Received:
    0
    ahhh, i love dealing with smart people!! so refreshing after spending some time on the ataretardedcommunity.com forums ...

    you can if you want, but i will end up doing it too, just because i am curious more than anything ....
     
  7. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
  8. Elphaba

    Elphaba Member

    Joined:
    Oct 1, 2003
    Messages:
    8
    Likes Received:
    0
    if you do that for both dlls and diff the files, they are the same?

    my guess is yes. wonder if they did that for some licensing whoha.

    i have about 2 hours of dl time on the sdk stuff.

    thanks for putting that up ... i'm not so bright with the windows scene ... have always done unix stuff. this should prove highly educational.

    thanks again.
     
  9. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
    The exports are exactly the same. It makes me wonder what they modified. I'm sure someone could disassemble it and determine this at some point should it become important.

    My background is almost entirely Win32 (C/C++, Java, and C# mainly). I've never looked at Python really, but I might start trying to pick it up.
     
  10. Joviex

    Joviex Member

    Joined:
    Sep 25, 2003
    Messages:
    49
    Likes Received:
    0
    Why are you guys wondering what they changed inside of python?

    To extend or expand, yes both different, Python with glue code you don't need to touch the python library at all. Their code is most likely inside the engine. I have bound python and lua before, and neither one would I stick inside an external DLL. Just a waste of programming sweat.


    The GLUE code is more than likely in the exe since it is typically very lightweight. I think if you parse all the py files for the functions you pretty much have whatever API you are going to get.
     
  11. Kentamanos

    Kentamanos Member

    Joined:
    Sep 25, 2003
    Messages:
    36
    Likes Received:
    0
    The glue code is definitely in the EXE since they're using a Python DLL with the exact same size as the officially released one.

    The question is really just a curiosity more than anything. Why modify it if you're not adding functionality?

    It would still be nice to get a debug version or create a wrapper for this DLL just to log calls to it. It would help us get a much better feeling for how the game works if you could see everytime it broke out into Python and what Python code it's calling with what parameters etc.
     
  12. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Either they were stupid and just override print and some other debugging features (You see them printing in their scripts and it should go to their debugging console) although you could do that "softcoded" or they modify the search path generation of python to fit their needs. Most likely there are just some minor changes.

    Well i've been dealing with Python Embedding in another Server Project (Ultima Online Server Emulator). We're using it as our main scripting language and i am pretty sure that such a debugging library should be no problem. The only problem with an easy solution is that you would catch/debug all internal calls too.

    cu,
    Storm
     
  13. Nomad_Wanderer

    Nomad_Wanderer Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    305
    Likes Received:
    0
    unstickin..
     
Our Host!