Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8014 > unrolled thread

Re: running multiple scripts -- which way is more elegant?

Started byFlorencio Cano <florencio.cano@gmail.com>
First post2011-06-20 16:19 +0200
Last post2011-06-20 16:19 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: running multiple scripts -- which way is more elegant? Florencio Cano <florencio.cano@gmail.com> - 2011-06-20 16:19 +0200

#8014 — Re: running multiple scripts -- which way is more elegant?

FromFlorencio Cano <florencio.cano@gmail.com>
Date2011-06-20 16:19 +0200
SubjectRe: running multiple scripts -- which way is more elegant?
Message-ID<mailman.181.1308579599.1164.python-list@python.org>
> Unfortunately I have not been able to
> work out how to get the imports to work.
>
> import config_script obviously doesn't work and __import__(config_script)
> works from the python interpreter but fails in the script (ImportError:
> Import by filename is not supported.)

You can use this:

exec("import " + module_name)

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web