human
I am working on the file "Devel/Old/v04-old/Milestones/Frame2D-v04-Milestone4.ipynb".
The first task is:
Notes

default load case for solving is 'all' as that is the default load combination
2nd order anal: member stiffness matrix does not change between iterations, but the transformation
  from local to global coords does (because of large node displacements), and thus does the global
  stiff matrix.  But loads do not change, either.

Analysis
Can you write Python program for it?

What is a the Python program you requested?
assistant
#Here is the Python program you requested.

@extend
class Frame2D:
    
    def buildK(self):
        K = np.mat(np.zeros((self.ndof,self.ndof)))
        for memb in self.members.values():
            Kl = memb.localK()
            Tm = memb.transform()
            Kg = Tm.T * Kl * Tm
            dofnums = memb.nodej.dofnums + memb.nodek.dofnums
            K[np.ix_(dofnums,dofnums)] += Kg
        return K

##test:
K = f.buildK()
K

@extend
class Frame2D:
    
    def buildP(self,loadcase='all'):
        P = np.mat(np.zeros((self.ndof,1)))
        for node,load,factor in self.iter_nodeloads(loadcase):
            P[node.dofnums] += load.forces * factor
        return P

##test:
f.buildP('one')

@extend
class Frame2D:
    
    def buildP(self,loadcase='all'):
        P = np.mat(np.zeros((self.ndof,1)))
        for node,load,factor in self.iter_nodeloads(loadcase):
            P[node.dofnums] += load.forces * factor
        for memb,load,factor in self.iter_memberloads(loadcase):
            fefs = memb.fefs([load])
            gfefs = memb.Tm.T * (fefs.fefs * factor)
            dofnums = memb.nodej.dofnums + memb.nodek.dofnums
            P[dofnums] -= gfefs
        return P

##test:
P = f.buildP('one')
P

@extend
class Frame2D:
    
    def solve(self,loadcase='all'):
        self.number_dofs()
        K = self.buildK()
        P = self.buildP(loadcase)
        D = np.mat(np.zeros((self.ndof,1)))
        
        N = self.nfree
        Kff = K[:N,:N]  # partition the matrices ....
        Kfc = K[:N,N:]
        Kcf = K[N:,:N]
        Kcc = K[N:,N:]
        
        D[:N] = np.linalg.solve(Kff,P[:N] - Kfc*D[N:])  # displacements
        R = Kcf*D[:N] + Kcc*D[N:] - P[N:]    # reactions at the constrained DOFs
        return D,R

##test:
f.reset()
f.install_all()
D,R = f.solve('one')
f.print_input()

##test:
D

##test:
R