Calling user defined functions from a different script..

John Machin sjmachin at lexicon.net
Wed Apr 15 07:48:03 EDT 2009


On Apr 15, 9:33 pm, "venutaurus... at gmail.com"
<venutaurus... at gmail.com> wrote:
> Hello all,
>           I have a situation where I need to call functions present in
> a different script whose hierarchy is something like below:
>
> C:\Pythonlib\uitl\script1.py {Place where my functions definitions are
> present}
>
> C:\Scripts\script2.py { Place where function calls are made}
>
>            In such a situation how can I import functions from
> script1.py and use it in script2.py.

http://docs.python.org/tutorial/modules.html#the-module-search-path





More information about the Python-list mailing list