Re: [Tutor] import of source code still not working

2006-02-20 Thread Alan Gauld
>>If you don't want to have to put the factor30 in front of all your >>function >> names you can do this: >> >> from factor30 import * But this is generally considered bad practice since the same function name can appear in many modules so the last module imported will hide all the others. The sm

Re: [Tutor] import of source code still not working

2006-02-20 Thread Adam
On 20/02/06, Kermit Rose <[EMAIL PROTECTED]> wrote:     From: Jason Massey Date: 02/20/06 12:20:03 To: Kermit Rose Cc: tutor@python.org Subject: Re: [Tutor] import of source code still not working   If you don't want to have to put the factor30 in front of all your function na

Re: [Tutor] import of source code still not working

2006-02-20 Thread Kermit Rose
    From: Jason Massey Date: 02/20/06 12:20:03 To: Kermit Rose Cc: tutor@python.org Subject: Re: [Tutor] import of source code still not working   If you don't want to have to put the factor30 in front of all your function names you can do this:from factor30 import *Which will put a

Re: [Tutor] import of source code still not working

2006-02-20 Thread Jason Massey
The problem here is that you need to reference the factor30 namespace to get to your functions: Your calls to your functions would then look like: factor30.factor(109) & factor30.factor0(109) If you don't want to have to put the factor30 in front of all your function names you can do t

[Tutor] import of source code still not working

2006-02-20 Thread Kermit Rose
IDLE 1.1.2 >>> import factor30 >>> factor(109) Traceback (most recent call last): File "", line 1, in -toplevel- factor(109) NameError: name 'factor' is not defined >>> factor0(109) Traceback (most recent call last): File "", line 1, in -toplevel- factor0(109) Na