Python: *args and **kwargs

A simple working example and a link to the official documentation

example

# using *args and **kwargs in functions
# 2018/10/24
# Official documentation: https://docs.python.org/2/tutorial/controlflow.html#more-on-defining-functions

# Python Bits & Pieces
# Stefan Gaillot
# xenjee@gmail.com


def args_and_kwargs(my_var, *args, **kwargs):
    print "a 
Read more

Python: split – examples

A few example about the split function.

example


#############################
print '-' * 30

my_path = '/Users/stefan/XenDrive/__WORK/PROJECTS/PULSE/18P520_python/shots/VFX_0010/3d/camera/Chair.fbx'
print my_path
split_my_path = my_path.split('/')[1:3]
print split_my_path

print '-' * 30
#############################

string01 = "Line1-abcdef \nLine2-abc \nLine4-abcd"
print string01.split()
print string01.split(' ', 1)

print '-' 
Read more

Python: join() – examples

A few examples about the join() string method.

example

code:


'''
From https://www.programiz.com/python-programming/methods/string/join
The syntax of join() is:
string.join(iterable)	
The join() method takes an iterable - objects capable of returning its members one at a time.
Some of the example of 
Read more

Hooks: Where to start

update: 2021/12/29

Things have changed and it’s now much easier to add hooks to your Flame install.
Simply copy them in /opt/Autodesk/shared/python and restart flame.

Starting with Flame 2022, Flame hooks need to be python3.
I haven’t updated any of the … Read more