PDA

View Full Version : 11.5 Update



BigHache
02-01-2013, 05:13 AM
With the new update Python has also received some love. :heart:

There are about 1,500 more lines of code in the pcore file and the new documentation is pretty smashing. My schedule is not very open now but I plan on spending some much needed time in the new docs as soon as possible. Overall the new update is pretty insane for what they've packed in it. Thanks guys!

Styler
02-01-2013, 05:38 AM
I'm f** excited =)

greg.reyna
02-01-2013, 01:19 PM
I love Python and the idea of Python. OOP programming has always been my bane and curse, having started with ARexx on the Amiga, a Basic-like language which is just about my speed. Python developers, open source mavens that they are, have had the wisdom, good sense, and kindness! to create a language that's functional in OOP or non-OOP forms. May you all live to be a hundred, and always be able to get it up! --Now all I've got to do is come up with an interesting way to use Python with LW!

Celshader
05-06-2013, 10:28 AM
The anatomy.html part of the documentation in the lwpython11.5.zip file describes "single-shot formatting" for generic scripting. Here's what it means to users writing generic scripts:

LW11.5 version of "Hello World" generic script using single-shot formatting:



import lwsdk

lwMF = lwsdk.LWMessageFuncs()
lwMF.info("Presenting...", "Hello, World!")


Same script using the more formal 11.0.x formatting for generic scripts:



import lwsdk

__lwver__ = "11"

class HelloWorld(lwsdk.IGeneric):
def __init__(self, context):
super(HelloWorld, self).__init__()

# LWGeneric -------------------------------------------
def process(self, ga):
lwMF = lwsdk.LWMessageFuncs()
lwMF.info("Presenting...", "Hello, World!")
return lwsdk.AFUNC_OK



ServerTagInfo = [
( "Python Hello World", lwsdk.SRVTAG_USERNAME | lwsdk.LANGID_USENGLISH ),
( "Hello World", lwsdk.SRVTAG_BUTTONNAME | lwsdk.LANGID_USENGLISH ),
( "Utilities/Python", lwsdk.SRVTAG_MENU | lwsdk.LANGID_USENGLISH )
]

ServerRecord = { lwsdk.GenericFactory("LW_HelloWorld", HelloWorld) : ServerTagInfo }