I rely on a small Python module which I am currently calling directly with 
@pyimport in a notebook:

using PyCall
@pyimport datetime
@pyimport TheModule

cursor = TheModule.connect() 


This works fine, but now I would like to wrap the Python module with some 
other functions in a julia package.  I tried 

module TheModuleInJulia

using PyCall
@pyimport TheModule

export geteverything 


function geteverything()

return collect(TheModule.connect())

end


and several varaitions thereof.  In my main file I can

using PyCall, TheModule


which works fine, but when I  

geteverything()


I get an error saying that TheModule is not defined.  What's the correct 
way to import and use the python module within the julia module? I didn't 
see anything about this in the docs for PyCall. Thanks -A

Reply via email to