How can I arrange items in a circle using Python?
Could use the polar coordinates r and theta, where x = r * cos(theta) and y = r * sin(theta)

eg below, a full circle with 60 pillars. Like minutes on a clock.


import bpy
context = bpy.context
scene = context.scene
from mathutils import Matrix
from math import radians, sin, cos
z = 0.5
r = 4
theta = radians(360) # 2Pi
columns = 60
alpha = theta / columns
for a in range(columns):
    angle = a * alpha
    x = r * cos(angle)
    y = r * sin(angle)
    bpy.ops.mesh.primitive_cube_add(location=(x,y,z))
    cube = scene.objects.active
    # rotate if needed
    #cube.rotation_euler.z = angle # or using Matrix
    rotmat = Matrix.Rotation(angle, 4, 'Z')
    cube.matrix_world *= rotmat

    cube.scale = (0.3, 0.05, 0.8)