On Thu, 11 Oct 2012 13:24:22 +0200
Gisle Vanem <(E-Mail Removed)> wrote:
> Hello list. I'm a newbie when it comes to Python.
> I'm trying to turn this:
> def print_sys_path():
> i = 0
> for p in sys.path:
> print ('sys.path[%2d]: %s' % (i, p))
> i += 1
> into a one-line python command (in a .bat file):
Is "one liner" an actual requirement or is the requirement to run it
from the command line?
python -c "
i = 0
for p in sys.path:
print('sys.path[%2d]: %s' % (i, p))