You cannot import class methods separately, you have to import the classes. You can do this by enumerating the classes you want to import:
from GP import class1, class2, class3
Note that this will still load the entire module. This always happens if you import anything from the module. If you have code in that module that you do not want to be executed when the module is imported, you can protect it like this:
if __name__ == "__main__":
# put code here
Code inside the block will only be executed if the module is run directly, not if it is imported.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…