"Chris F.A. Johnson" <[EMAIL PROTECTED]> writes:

> On 2005-10-15, Jari Aalto wrote:
>    Don't indent:
>
> function compile ()
> {
>          python -c '
> import os, sys, py_compile;
> i = 0;
> for arg in sys.argv:
>       file  = os.path.basename(arg);
>       dir   = os.path.dirname(arg);
>       i += 1;
>       if i > 1  and os.path.exists(dir):
>           os.chdir(dir);
>           print "compiling %s\n" % (file);
>           py_compile.compile(file);
>   '  $*
> }

Thanks, is there equivalent to this Perl statement in Python?

   @list = @ARGV[1 .. @ARGV];

or something similar so that I could avoid the 1 > 1 (sys.argv) check
altogether?

Jari

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to