FW: python import sys.path
John Machin
sjmachin at lexicon.net
Fri Jan 2 09:28:15 EST 2009
On Jan 3, 1:09 am, "Kelly, Brian" <Brian.Ke... at uwsp.edu> wrote:
> After following your suggestions I was able to confirm that the 2.5
> interpreter was being invoked. So then I grepped for all instances of python
> in the scripts that were imported as modules: from bacula_conf import *
>
> The calling script cleanup.py is invoking purge_client.py like an external
> script:
>
> def purgeAll(options, computer_name):
> cmd = "python purge_client.py %s" % computer_name
> if options.pretend <> True:
Who wrote that?
> error = os.system(cmd)
> else:
> _log.info("Done. No changes made due to --pretend flag.")
#### error is not defined in this branch
> if not error: #### Splat!
> return True
> else:
> return False
AArrgh! Try:
return not error
> When I saw the imports I assumed the functions in purge_client.py were being
> referenced from the calling scripts symbol table.
What does that mean??
More information about the Python-list
mailing list