To change the name of all the scene objects, you have to iterate over all the objects. You can do that recursively or non-recursively.
For the given object, you can simply check if the name has a "
." and get the substring before that dot.
# get name
name = op.GetName()
# find last ".""
pos = name.rfind(".")
if pos != -1:
# get substring
name = name[0:pos]
But this will change the name of all objects that have a "
." in the name. A more advanced version of this would check if the part right of "
." is actually a number.