When you have a collision you can get the xy's of the two objects, and compare their relative positions to each other.
For example if the wall was on the left side its x would be less than the ships x.
The problem is you can only estimate where the impact point is because C2 does not do per pixel collisions.
Instead you have a collision polygon, which tells you approximately how wide, and long your object is.
Usually the origin is in the center of the object, so a good estimate of where its side would be half the width, or half the height.
So with our example you could adjust the offset by saying self.x-(self.width/2).
wall x<self.x, self.x-(self.width/2)
wall x> self.x, self.x+(self.width/2)
wall y< self.y, self.y-(self.height/2)
wall y> self.y, self.y+(self.height/2)