Errrm.
What's unclear about the examples on the Python ltspice library page?
Example circuit:
Example code:
import ltspice
import matplotlib.pyplot as plt
import numpy as np
import os
l = ltspice.Ltspice(os.path.dirname(__file__)+'\\rc.raw')
# Make sure that the .raw file is located in the correct path
l.parse()
time = l.getTime()
V_source = l.getData('V(source)')
V_cap = l.getData('V(cap)')
plt.plot(time, V_source)
plt.plot(time, V_cap)
plt.show()
Example output:
You have named nodes (cap and source) and ask for the data using the following line:
l.getData('V(source)')
"getData" is the function. "V()" tells LTspice you want the voltage, and "source" says which node.
From the comments, it seems that the ltspice library only does part of what you need.
This project seems to cover the other half - namely, making LTspice execute a simulation from within a Python program.