Extending Python Questions .....

Ben bnsilinux at gmail.com
Tue Feb 24 09:20:48 EST 2009


On Feb 23, 2:31 pm, Nick Craig-Wood <n... at craig-wood.com> wrote:
> Ben <bnsili... at gmail.com> wrote:
> >  In My S-Lag Project called, SLAG, I have some function keys that get
> >  mapped back to S-lang internal functions.
>
> >  My SLAG project works pretty much like Python (as does the S-Lang).
> >  You write a S-lang script
> >  that "imports" your extension. module - and all this gets run by the
> >  shell/interpreter.
>
> >  I allow function keys to be mapped back internal function(s) inside of
> >  the controlling program.
>
> >  My question is which Python C api Do I need to this with ?
>
> Do you mean like this?
>
>  http://code.google.com/p/python-slang
>
> Not sure how well maintained it is though.
>
> > Do I need to worry about my reference counting since the Python
> > Program is in essence calling a function in itself?
>
> I'm not sure I understand you here, but in general you don't need to
> worry about reference counting in Python - it all happens behind the
> scenes.  If you are writing a python extension in C then you do need
> to worry about reference counting - a lot!
>
> --
> Nick Craig-Wood <n... at craig-wood.com> --http://www.craig-wood.com/nick

No, It uses the the S-lang for video, and input control. However, SLAG
is more of an abstract layer on top of that.

It has a Structures that contains menus and screens (menumodule /
screenmodule). One LOADS them up with parameters.
such as creating a new menu is like:

OpenMenu( Company name, SubSystem, this program name, mode, bottom
status display)   - Create initial menu structure
Addtomenu(Menu Block Set name, DISPLAY line, ID, type of program,
password ID )  - add to / update MENU blocks.
runMenu()   - Displays the whole create menu structure.

The Menu structure is done in pull downs and scrollable blocks in a
TUI (text User Interface) and using the
S-lang screen library is fully mouseable.

The screen module works mych the same way, but with the abiltity to
open and close and
work within "Sub Screens".


For those who do not know, S-lang is a interpreted language much like
Python. However, there
is s direth of library modules. The original S-lang started out as
library of screen of keyboard
modules, but has been expanded

My SLAG project does not care in reality WHICH or what language, it is
simply handling menu and
screen control.

Hope this helps ...



More information about the Python-list mailing list