Jari Aalto wrote:
> 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?
for arg in sys.argv[1:]:
...
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell
"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);
>
On 2005-10-15, Jari Aalto wrote:
>
> [Keep CC, thank you]
>
> Please suggest comments how can I make this script to work
> from bash. Also how can I skip better the [0] argument from
> command line without hte extra variable i?
>
> #!/bin/bash
>
> function compile ()
> {
> pyth
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> Jari Aalto wrote:
>
| > Please suggest comments how can I make this script to work
| > from bash.
>
> replace it with a call to the compileall module?
>
> $ python -mcompileall [directory...]
Thanks, but that will not work. The files are gathered
Jari Aalto wrote:
>
> [Keep CC, thank you]
>
> Please suggest comments how can I make this script to work
> from bash. Also how can I skip better the [0] argument from
> command line without hte extra variable i?
Didn't check, but something like this?
#!/bin/python
import os, sys, py_compile;
Jari Aalto wrote:
> Please suggest comments how can I make this script to work
> from bash.
replace it with a call to the compileall module?
$ python -mcompileall [directory...]
?
$ python -mcompileall -h
option -h not recognized
usage: python compileall.py [-l] [-f] [-q] [-d d
[Keep CC, thank you]
Please suggest comments how can I make this script to work
from bash. Also how can I skip better the [0] argument from
command line without hte extra variable i?
#!/bin/bash
function compile ()
{
python -c '
import os, sys, py_compile;
i