Home

On Sep 21, 12:32 pm, "tedpot...@gmail.com" <tedpot...@gmail.com>
wrote:
> Hi,
>
> I'm trying to create my own lib of functions, but it seems like I can
> only import them if they are in pythons lib folder.
>
> Example
> I have a folder called
> K:\mypython
>
> Now in the interactive python shell I type
> Import k:\mypython\listall
> And get a error on :
>
> If I store listall.py in pythons lib folder and type
> Limport listall
>
> It works fins.
>
> Can I create my own library of functions and store them in a separate
> dir????
>
> Also I try to creat a folder in pythomns lib folder and that did not
> work
>
> Help
> -Ted

One workaround is to do to this:

<code>

import sys
sys.path.append(r'K:\mypython')
import listall

</code>

You can also add your path to the .pth file, but I've never done that,
so I can't tell you how.

Hope that helps!

Mike

previous
next

Re: Script that Navigates Page needs Javascript Functionality
Re: correction
Re: C/C++ guidelines
databases
Re: Help with Dictionaries and Classes requested please.
Rodzic Po Ludzku
Kidprotect
Fundacja Avalon
Akogo
Fundacja Hobbit