"Luis Zarrabeitia" wrote:
>Is there any way to "import" a .py file that is not on sys.path?
>I'd like to 'import' a file that resides somewhere on my filesystem without
>having to add it's directory to sys.path. At first, I thought that something
like
>
>my_module = __import__("path/to/file")
>
>
Luis Zarrabeitia wrote:
> Is there any way to "import" a .py file that is not on sys.path?
> I'd like to 'import' a file that resides somewhere on my filesystem without
> having to add it's directory to sys.path. At first, I thought that something
> like
>
> my_module = __import__("path/to/file"
Is there any way to "import" a .py file that is not on sys.path?
I'd like to 'import' a file that resides somewhere on my filesystem without
having to add it's directory to sys.path. At first, I thought that something
like
my_module = __import__("path/to/file")
would work, but I was mistaken.