Delete a function

paul paul at
Wed Mar 21 18:45:01 CET 2007

gtb schrieb:
> On Mar 21, 11:37 am, Steve Holden <s... at> wrote:
>> gtb wrote:
>>> After a function has been imported to a shell how may it be deleted so
>>> that after editing it can reloaded anew?
>> Use the built-in reload() function to reload the module that defines the
>> function.
> Thanks, tried that now and get nameError: with the following.
> import sys
> sys.path.append("c:\maxq\testScripts")
> from CompactTest import CompactTest
> from compactLogin import dvlogin
> reload(compactLogin)
you haven't imported compactLogin but dvlogin from the compactLogin
namespace. Try:

import compactLogin something with compactLogin.dvlogin...



More information about the Python-list mailing list