[Tutor] calling user defined function
Kent Johnson
kent37 at tds.net
Mon Feb 23 00:09:54 CET 2009
On Sun, Feb 22, 2009 at 4:21 PM, roberto <roberto03 at gmail.com> wrote:
> hello
> i have a question which i didn't solved yet:
> i can define a function using the text editor provided by IDLE 3.0;
> then i'd like to call this function from the python prompt
>
> but when i try to do it, python warns me that function doesn't exist
> of course if i define the function directly using the >>> prompt,
> after that everything is fine
>
> may you tell me where i have to save the file that defines the
> function is order to use it later ?
The simplest way is to save the file in your working directory, then
import as Bob showed you.
Kent
More information about the Tutor
mailing list