View Full Version : Is there any documentation/reference for new Python in 2018?

12-31-2017, 06:27 PM
I've been eager to see what's possible with Python in 2018 but can't find any documentation or info on the scripting changes/additions?

01-01-2018, 08:22 AM
The Python documentation is zipped in the SDK folder in your installation


01-01-2018, 06:39 PM
The Python documentation is zipped in the SDK folder in your installation



02-07-2018, 02:38 PM
The Python documentation is zipped in the SDK folder in your installation


Actually, just filed a bug on this (LWB-3317), but at least with 2018.0.1 install for OSX, the "lwpython.0.zip" archive file isn't present in the SDK directory. It's present in the LW2018.0 install's SDK directory, but something apparently went wrong during LW2018.0.1 installer package generation. I've tried installing multiple times, after multiple DLs of the installer package itself, and the "lwpython.0.zip" archive file reliably isn't present in LW2018.0.1's SDK dir (on OSX).

I have no clue whether Windows install has the same issue, can't test it at this moment.

If someone could post the "lwpython.0.zip" SDK for LW2018.0.1 Mac64 (or put up fixed installer package(s)), that'd be appreciated. Alternately, if there's no difference between the 2018.0 and 2018.0.1 versions of the Python SDK, we can just use the one from 2018.0, but would need official confirmation there's no differences.

03-26-2018, 09:28 AM
Hi together,

as sayed in the LScript-Forum I will give python a Chance,

BUT ... BUT ... BUT

I do not want to search for every bit of Information. Especially not in many different files. And especially not in the c++ docs if I Need python info.... The info therein is not fitting in every case.
Is there realy no documentation on for eg how to build a user Interface?

For example:
I am not able to open a Panel which has the normal OS-look (the Icon at the top-left is missing as so as the closebutton to the top right)
... Yes I have tried the diferent PANF_ flags... all Shows the same optic
Next Problem....
How can I react on the mouse? how do I catch the PANF_MOUSETRAP or PANF_MOUSETRACK, how is that handler called? where to find this Information?
Next Problem...
I give a button_ctl a drawhandler (btn.userdraw)... but only drawMode 3 is reaching the handler... how can i reacto on other drawModes
It does not make sense to get a userdrawn button if the system-erase did its job and the button will be empty after the mouse did hoover it

I know, that you could not document every possible Situation, but such Basic things should be found in the docs (or even make some examples)

I searched the Forum for sources of Information... and yes there was some info but I dont want to search for every bit of Information. This had to be part of the official docs from NT.

Python is innately a text intensive language so I must invest more time to write scripts. And if I must search ervery peace of Information, than the time to write scripts did grow and grow and grow...

Please give us a Documentation that is worth to be called so
and next please... Don't let LScript die, because it is much faster to get results with it than in python... and most scripts don't Need to talk to other applications.

This style of docs is something I did exspect for non-cost programs like blender....

Why don't you give us the Information we Need in a way we Need? You have done such an excellent Job with LW, please do as so with the docs.


03-26-2018, 11:06 PM
Justaddmilk.org was an excellent resource for python examples of the ui. Unfortunately it looks like the domain expired. If you can manage to find archived pages from waybackmachine that would be a quick way to see how to build ui items. If I get a chance I could post examples as that's how I built my scripts.

03-27-2018, 03:44 AM
Thank you for ansering ernpchan.
I will be interested in every python ui-example, it is really hard to find Information about.

It is not the fact, that I am not able to build a sort of UI. But where can I get Information on reacting on mouse Actions?

For example:
If a user moves around the mouse and hoovers over an control, how can I react on this?

I was able to build the following
For my as someone who was never in touch with python, this was a hard work.
Now take a look at the custom drawed Buttons at the bottom right of this requester. After the user hoovers a button, the button Looks like the following
I did not find a way to react on this.

What I discovered also is, that if I activate a userdraw function, the Event_func doesn't be called anymore. Now I think i do something wrong, but nowhere is the Information on how to manage this.
I found some examples in the Internet, but the UI's that are in use there are... very very very simple.
I don't know if you had a look at my nuArchitect bundle (can be found in the LScript Forum). Some of the requesters in this bundle even use a sort of custom-controls. But if I am not able to do such Basic stuff with python or there is no Information to find on how to do so, than... sorry... than python is not worth to look closer at it. At last to me. I don't want to spend hours to find out These things in the Internet. There should be some examples for such Basic stuff.

By the way the docs mainly are some Kind of "look here... it does give this" and not "look here... so it is to be used"

I am very frustrated at this Situation because LW is really great, why not the docs too?