Python in the shells?

A community Age for Uru.

Moderator: Aloys

User avatar
Aloys
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
MOULa KI#: 0
Location: France (GMT +1)
Contact:

Post 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?
Paradox
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada
Contact:

Post 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.
User avatar
Robert The Rebuilder
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
MOULa KI#: 1299
Location: Virginia, US

Post 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.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Owehn
Posts: 132
Joined: Sat Sep 29, 2007 8:05 am

Post 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.
User avatar
Aloys
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
MOULa KI#: 0
Location: France (GMT +1)
Contact:

Post 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.
Tsar Hoikas
Councilor of Technical Direction
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
MOULa KI#: 23335
Location: South Georgia
Contact:

Post by Tsar Hoikas »

pahtsSHELLNO.py

VarSHELLNO

Make sense?
Image
Paradox
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada
Contact:

Post by Paradox »

Actually, you can't start a variable name with numbers, so the Shell # must be at the end.
User avatar
zib_redlektab
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
MOULa KI#: 0
Location: Avoiding Direct Sunlight
Contact:

Post 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:
Lurker extraordinaire!
http://www.zibland.com
Tsar Hoikas
Councilor of Technical Direction
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
MOULa KI#: 23335
Location: South Georgia
Contact:

Post by Tsar Hoikas »

NO. Python vars can only start with characters, NEVER EVER an integar or any other kind of number!
Image
Besharen
Posts: 71
Joined: Fri Nov 16, 2007 9:45 pm

Post 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.
Locked

Return to “Ahra Pahts”