basically I want to turn something like this
FlorenceBuilding04_geometry_clean_001_Loc1_position
to
/root/world/geo/FlorenceBuilding04_model_geometry
and
FlorenceBuilding05_geometry1_clean_001_Loc1_position
to
/root/world/geo/FlorenceBuilding05_model_geometry
Code:
s = GetName()
if s.endswith( "_position" ):
rootname = "/root/world/geo/"+s[ :- 18 ].rstrip("_")
rootname =rootname.replace("geometry","model_geometry")
thanks in advance
And you could do this also:
>>> a = 'FlorenceBuilding04_geometry_clean_001_Loc1_position'
>>> path = '/root/world/geo/' + a.split('geometry')[0] + 'model_geometry'
>>> print(path)
/root/world/geo/FlorenceBuilding04_model_geometry