Page 2 of 3

Re: Plasma Python API

PostPosted: Mon Mar 29, 2010 2:02 am
by diafero
As I said, this list is automatically generated - and unfortunately, I found no way to get the parameters of a function/method inside Python. Cyan always listed them in the description though. I don't feel like copying >2000 parameter lists manually from the Plasma.py file...
However, if we assume that this "Params" list provided by Cyan is correct (and no "Params:" means that no parameters can be passed to the function), I could adapt the script to parse it and print it in a readable way.

Re: Plasma Python API

PostPosted: Fri Apr 02, 2010 3:13 am
by diafero
I changed the script to beautify the parameters list. The wiki page is now the actual output of the script, no manual search'n'replace was done.

That format you suggested, Hoikas, would make the page even longer than it is now, and I'm not sure whether that adds to readability. Plus, the way the script works, it can not sort the entries, it just prints them in the order it gets from the "dir" function. Since we have only two classes with properties, it's not worth thinking too much about those.

Re: Plasma Python API

PostPosted: Fri Apr 02, 2010 1:08 pm
by Tsar Hoikas
This is good. All it really needs now are section divisions. I can go through and add those... Eventually >.>

Re: Plasma Python API

PostPosted: Sat Apr 03, 2010 2:40 am
by diafero
The problem is that in theory, a class can contain another class, so I can't just make a class "===classname===". But no need for you to do that manually, I think I found a solution: Make the number of "=" signs depend on the indention. Then it would look right even with subclasses. Expect the update today or tomorrow.

Re: Plasma Python API

PostPosted: Sat Apr 03, 2010 12:27 pm
by Tsar Hoikas
I didn't think about that >.> Though I don't remember anywhere in the Plasma module that uses subclasses. You solution sounds good though (I don't have to do anything :P).

Re: Plasma Python API

PostPosted: Sat Apr 03, 2010 1:21 pm
by diafero
No, Plasma doesn't use it, true. I already heavily adapted the script, but at least I want to be sure I don't miss anything - who knows what someone might run this script on one day... :lol:

You solution sounds good though (I don't have to do anything :P).
I knew you were going to like it :D

Re: Plasma Python API

PostPosted: Sun Apr 04, 2010 6:28 am
by diafero
Ok, I updated the site. Does anyone know how to indent the bullets without these strange double-bullets at the beginning?

Re: Plasma Python API

PostPosted: Sun Apr 04, 2010 10:11 am
by Chacal
Good job. Very clear.
I always wondered how "Function: PtAvatarSpawnNext() - Send the avatar to the next spawn point " works. How does it know what the "next" spawn point is? Does it keep a pointer to the last point you spawned at?

Re: Plasma Python API

PostPosted: Sun Apr 04, 2010 12:33 pm
by Tsar Hoikas
diafero wrote:Ok, I updated the site. Does anyone know how to indent the bullets without these strange double-bullets at the beginning?


I don't think MediaWiki expects you to start off with "**". You could surround single bullets (one asterisk) inside a blockquote. I think the page looks good with a double header (== Class == whereas you were using === Class ===) and single bullets. I see the effect you were going for though; MediaWiki is just being a pain.

Re: Plasma Python API

PostPosted: Sun Apr 04, 2010 1:33 pm
by diafero
I wanted the bullet points to be indented... and I deliberately used 3rd-level headers because level 2 captions get this additional horizontal line and are way bigger, so the page gets longer and longer...