I am trying to use PyCall to reuse a python script which has this code component. I have avoided using python’s oo class system and so I’m not too sure what is going on.
from ib_insync import * ib = IB() ib.connect('nnn.nnn.n.nnn', 1234, clientId=12)
I would like to expose the class IB as ib as in the code segment as in
ib = IB()
I have read through Pycall docs " defining python classes" but I’m just winging it here.
Defining Python Classes using PyCall tk = pyimport("Tkinter") @pydef mutable struct SampleApp <: tk.Tk
so would the following julia code achieve the same thing?
IB = pyimport("ib_insync") @pydef mutable struct ib <: IB() ib.connect('nnn.nnn.n.nnn', 1234, clientId=12