Re: How to call a function defined in another py file

2007-02-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > I have a function called 'test' defined in A.py. > How can I call that function test in my another file B.py? > > Thank you. > # b.py import A A.test() -- http://mail.python.org/mailman/listinfo/python-list

Re: How to call a function defined in another py file

2007-02-19 Thread Martin Blume
<[EMAIL PROTECTED]> schrieb >> >>> I have a function called 'test' defined in A.py. >>> How can I call that function test in my another file B.py? >> >> In B.py: >> import A >> A.test() >> > > But Do I need to put A.py and B.py in the same directory? No, but then you have to take certain preca

Re: How to call a function defined in another py file

2007-02-19 Thread Jeremy Gransden
On Feb 19, 2007, at 3:27 PM, [EMAIL PROTECTED] wrote: > On Feb 19, 2:22 pm, "Martin Blume" <[EMAIL PROTECTED]> wrote: >> <[EMAIL PROTECTED]> schrieb >> >>> I have a function called 'test' defined in A.py. >>> How can I call that function test in my another file B.py? >> >> In B.py: >> >> import A

Re: How to call a function defined in another py file

2007-02-19 Thread Jeremy Gransden
from a import test be sure a is in your path. jeremy On Feb 19, 2007, at 3:20 PM, [EMAIL PROTECTED] wrote: > Hi, > > I have a function called 'test' defined in A.py. > How can I call that function test in my another file B.py? > > Thank you. > > -- > http://mail.python.org/mailman/listinfo/p

Re: How to call a function defined in another py file

2007-02-19 Thread silverburgh . meryl
On Feb 19, 2:22 pm, "Martin Blume" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> schrieb > > > I have a function called 'test' defined in A.py. > > How can I call that function test in my another file B.py? > > In B.py: > > import A > > A.test() > > HTH > Martin But Do I need to put A.py and B.

Re: How to call a function defined in another py file

2007-02-19 Thread Martin Blume
<[EMAIL PROTECTED]> schrieb > > I have a function called 'test' defined in A.py. > How can I call that function test in my another file B.py? > In B.py: import A A.test() HTH Martin -- http://mail.python.org/mailman/listinfo/python-list

How to call a function defined in another py file

2007-02-19 Thread silverburgh . meryl
Hi, I have a function called 'test' defined in A.py. How can I call that function test in my another file B.py? Thank you. -- http://mail.python.org/mailman/listinfo/python-list