Skip to content

Importing local modules #70

Closed
Closed
@boriskaus

Description

@boriskaus

Thanks, this appears to be a very useful package which would solve many compatibility problems between windows, linux etc.

One thing I am wondering is how to import a local module. In PyCall this would be done as:

const pymodule = PyNULL()
pushfirst!(PyVector(pyimport("sys")["path"]), (@__DIR__)*"/dir_relative_to_src") 
copy!(pymodule, pyimport("mylocalmodule"))

Help on how to do this in PythonCall would be highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions