Hey folks,
just a little quicktip to get into the mess that is python. Until now I made my way around learning python but there are definetly some good uses for houdini.
This is probably not one of them but it gives you a first idea on how python works in comparison to vex.
Fact is that python can be a great addition to the houdini skillset so why the heck not. But let's start slow with a simple look at the differences. If you guys are interested I keep examples and more detailled info coming.
----------------
The premise - there is a grid with a group of points. Make the grid black and the group red.
Simple enough but it has the small hickup that color is initialized with 1.

In SOP land this is done by using a color node with group set to the Paint group. But due to the color initialization we need two nodes - one to make all points black and on to turn the selected points red.

In VEX you can do it with one node but then you can't use the group parameter. If you would use it the wrangle would run only over the Paint group points. Luckily there is a function that let's us test if a point is part of a specific group.

And now to the key of this comparison - Python. Using the python node you can basicly create a script that is similar to a detail wrangle.
But even with this simple example you will notice the big difference in the approach. First we create the attribute color on the geometry already as black.
Then we have to grab the existing point groups and check if it's the right one. Since there is only one group we could get by without that line - but it makes sense to do that in general - in real use cases there may be multiple groups.
Especially different is the syntax for loops.
- you don't create datatypes like "int i"
- no blocks by {} - you just indent the next line
- no ";" which feels weird

If you guys would like to see more python in the future - let me know. My main interest in python is it's capability to handle files and create nodes from scratch.
Like having a python node that goes into a specific directory, finds all the modells of maybe sci fi panels to use use in the project and creates file nodes foreach single one, already hooked up to maybe a switch node. All with a single button.
Very useful in my mind :-p
Cheers
Dave