Delete a function
goodTweetieBird at hotmail.com
Wed Mar 21 21:02:19 CET 2007
On Mar 21, 12:45 pm, paul <p... at subsignal.org> wrote:
> gtb schrieb:> On Mar 21, 11:37 am, Steve Holden <s... at holdenweb.com> 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
> ...do something with compactLogin.dvlogin...
> Eventually you'll develop a feel for how namespaces work in Python...
... where " 0 < Eventually < Infinity " ;^)
Whoa, my brain is full, I'll glean it directly tho. Thanks all for
More information about the Python-list