Python in the shells?

A community Age for Uru.

Moderator: Aloys

Postby Aloys » Tue May 23, 2006 4:43 pm

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?
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby Paradox » Tue May 23, 2006 7:25 pm

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.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Postby Robert The Rebuilder » Wed May 24, 2006 10:15 am

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
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Postby Owehn » Wed May 24, 2006 11:17 am

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
Owehn
 
Posts: 132
Joined: Sat Sep 29, 2007 8:05 am

Postby Aloys » Wed May 24, 2006 12:05 pm

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

Postby Tsar Hoikas » Wed May 24, 2006 1:04 pm

pahtsSHELLNO.py

VarSHELLNO

Make sense?
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Postby Paradox » Wed May 24, 2006 4:45 pm

Actually, you can't start a variable name with numbers, so the Shell # must be at the end.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Postby zib_redlektab » Wed May 24, 2006 6:41 pm

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
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby Tsar Hoikas » Wed May 24, 2006 6:54 pm

NO. Python vars can only start with characters, NEVER EVER an integar or any other kind of number!
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Postby Besharen » Wed May 24, 2006 8:38 pm

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.
Besharen
 
Posts: 71
Joined: Fri Nov 16, 2007 9:45 pm

Next

Return to Ahra Pahts

Who is online

Users browsing this forum: No registered users and 0 guests