Page 1 of 2

Posted: Tue May 23, 2006 4:43 pm
by Aloys
Some people may want to add some functionality in their shells via Python coding; that is something we haven't talked about yet, and which may be important.
Python can be a source of fun but it can also be a source of bugs.

Given our model of community Age and the way shells are created and exported separately, how would Python integrate into that?
(I'm not versed at all in this subject I must confess, so I have no idea.)

What files would people need to send?
Would we need a naming convention for files, variables and functions to avoid any conflicts?
Would we need to do some work ourselve to implement everything together (dabble into files like the SDL or others) or could everything be done separately like the shells?

etc.

As always the goal would be to require minimal intervention from us, so anyone can do their stuff and almost all we have to do is to upload that to the UAM servers.

If it is too much of a headache should we simply disallow it? Or disallow it for now (since few people use it right now) and see later?

Posted: Tue May 23, 2006 7:25 pm
by Paradox
For python I imagine the follwing setup:

Everyone who wants Python, writes a script for their shell. All of the scripts would be collected on an FTP server or SVN, and compiled to a .pak file before release. Then it would just be distributed with the prp and age files.

About variable naming, someone suggested a naming convention for the Shell objects.

Ex. D'niSpitoon145 = A D'ni Spitoon in Shell 145

For python, just suffix the variables with the shell number.

Posted: Wed May 24, 2006 10:15 am
by Robert The Rebuilder
I agree. The python scripts for your shell/page should have the shell number in the filename, e.g. shell145Clickables.py. And like Paradox said, all these .py files from all shells should be compiled and added to the PAK file by the person managing the age files.

Posted: Wed May 24, 2006 11:17 am
by Owehn
We should probably require the shell number to be near the front of the file name, so if you sort by name you can find the file easily.

Posted: Wed May 24, 2006 12:05 pm
by Aloys
All the objects in the Age (well those in shells that is) so far are named with the shell number as prefix. As Owen says it makes them easier for sorting out.

Posted: Wed May 24, 2006 1:04 pm
by Tsar Hoikas
pahtsSHELLNO.py

VarSHELLNO

Make sense?

Posted: Wed May 24, 2006 4:45 pm
by Paradox
Actually, you can't start a variable name with numbers, so the Shell # must be at the end.

Posted: Wed May 24, 2006 6:41 pm
by zib_redlektab
technically it shouldn't matter, if they are all shell#.py, then if you do sort by name then they will still all sort in order, as long as all the filenames start with the same letters.

about the variables, the same thing. just have all the variables start with shell# and then the variable name. shell#[varname] like that. :unsure:

Posted: Wed May 24, 2006 6:54 pm
by Tsar Hoikas
NO. Python vars can only start with characters, NEVER EVER an integar or any other kind of number!

Posted: Wed May 24, 2006 8:38 pm
by Besharen
Umm...isn't that what Zib is saying? Instead of starting it with just " #_____", start it with "shell#______". Then you're not starting it with a number (you're starting it with the word "shell") but you can still sort it by number. If everyone started with "shell", then it would look at the next characters after "shell", which would be the numbers.