Re: Embedding Python: Creating Python Class from Application

2006-01-12 Thread Kakacek
In the mean time I did this. It works however, it creates memory leaks. Any idea what could be wrong? procedure TForm1.PyCreateInstance(Sender: TObject; PSelf, Args: PPyObject; var Result: PPyObject); var BClassName: PChar; BInstName: PChar; // BB: Boolean; BModule: PPyObje

Embedding Python: Creating Python Class from Application

2006-01-12 Thread Kakacek
Hello All, Let's say I have a following python code: class hw_class: def __init__(self): pass def hello_world(self): print 'Hello World!' create_instance('hw_class', 'hw') hw.hello_world() hw = None The 'create_instance' function should be implemented in the application (powe