On Tuesday, February 5, 2013 5:55:50 PM UTC-8, Steven D'Aprano wrote:
> To do anything meaningful in bash, you need to be an expert on
> passing work off to other programs...
[snip]
> If you took the Zen of Python,
> and pretty much reversed everything, you might have the Zen of Bash:
I have to
On Sat, Feb 9, 2013 at 5:29 AM, Dennis Lee Bieber wrote:
> If you want the real nightmare -- look into the IBM "queue" scheme
> (not many REXX implementations except on IBM mainframes support that).
> One can push lines onto the queue, such that when the script exits, the
> command proces
Dennis Lee Bieber wrote:
> Line 3 has unquoted "echo" which is not a REXX command; it is
> considered an external command and is passed the /result/ of calling
> REXX time() -- where Windows executes it
Good lord, that's even worse than I feared. So it's not just unparsable
non-REXX code that is
Chris Angelico wrote:
> On Thu, Feb 7, 2013 at 5:50 PM, Steven D'Aprano
> wrote:
>> On Thu, 07 Feb 2013 16:28:17 +1100, Chris Angelico wrote:
>>
>>> You misunderstand. It's actually a very simple rule. Python follows C's
>>> principle of accepting that any return value from an expression should
>
On Thu, Feb 7, 2013 at 5:50 PM, Steven D'Aprano
wrote:
> On Thu, 07 Feb 2013 16:28:17 +1100, Chris Angelico wrote:
>
>> You misunderstand. It's actually a very simple rule. Python follows C's
>> principle of accepting that any return value from an expression should
>> be ignored if you don't do an
On Thu, 07 Feb 2013 16:28:17 +1100, Chris Angelico wrote:
> On Thu, Feb 7, 2013 at 10:46 AM, Steven D'Aprano
> wrote:
>> Dennis Lee Bieber wrote:
>>> Though that is the nice feature of REXX*... Anything that wasn't
>>> parsable as a REXX statement was automatically sent to the current
>>> command
On Thu, Feb 7, 2013 at 10:46 AM, Steven D'Aprano
wrote:
> Dennis Lee Bieber wrote:
>> Though that is the nice feature of REXX*... Anything that wasn't
>> parsable as a REXX statement was automatically sent to the current
>> command processor.
>
> Nice? Are you being sarcastic? What you're describi
Dennis Lee Bieber wrote:
> On Wed, 6 Feb 2013 17:16:04 +1100, Chris Angelico
> declaimed the following in gmane.comp.python.general:
>
>>
>> It feels silly enough translating this OS/2 batch script:
>>
>> @logon SOME_USER /pSOME_PASS /vl
>> @e:\rexx\load
>> @db2 start database manager
>> @exit
On 2013-02-06, Steven D'Aprano wrote:
> Chris Angelico wrote:
>
>> Python is not an "excellent option". It's a bad fit for shell
>> scripting, it just happens to be way better than a weak shell. Having
>> grown up on command.com, I found OS/2's cmd.exe to be a massive
>> improvement, and Windows's
On 2013-02-06, Neil Cerutti wrote:
> On 2013-02-05, Grant Edwards wrote:
>> On 2013-02-05, Neil Cerutti wrote:
>>> On 2013-02-05, Walter Hurry wrote:
> Sorry, I'm a Linux guy. I have no clue what that means.
Hooray for common sense! Python is great, but it's silly to use
Pyt
On 2013-02-06, Ian Kelly wrote:
> On Tue, Feb 5, 2013 at 3:59 PM, Grant Edwards wrote:
>> On 2013-02-05, Neil Cerutti wrote:
>>> On 2013-02-05, Walter Hurry wrote:
> Sorry, I'm a Linux guy. I have no clue what that means.
Hooray for common sense! Python is great, but it's silly t
On 2013-02-05, Grant Edwards wrote:
> On 2013-02-05, Neil Cerutti wrote:
>> On 2013-02-05, Walter Hurry wrote:
Sorry, I'm a Linux guy. I have no clue what that means.
>>>
>>> Hooray for common sense! Python is great, but it's silly to use
>>> Python (unless there is good reason) when a sim
Dennis Lee Bieber writes:
> PowerShell is meant to be used for administrative level scripting,
> replacing such things as WSH.
Yeah and WSH has been included since Windows 98... So Windows has been
at least OK with shell scripting VBScript and JScript for the last 15
years or so. And I can
On Feb 6, 6:55 am, Steven D'Aprano wrote:
> I would not hesitate to use Python, or some other high-level language like
> Ruby, over bash for anything non-trivial that I cared about. It might not
> be as terse and compact as a well-written bash script, but that's a *good*
> thing, and a poorly-wri
On Wed, Feb 6, 2013 at 12:55 PM, Steven D'Aprano
wrote:
> Chris Angelico wrote:
>
>> Python is not an "excellent option". It's a bad fit for shell
>> scripting, it just happens to be way better than a weak shell. Having
>> grown up on command.com, I found OS/2's cmd.exe to be a massive
>> improvem
On 02/05/2013 08:32 PM, Nobody wrote:
> A shell script is only the better option if (almost) the *only* thing the
> script needs to do is to execute commands.
>
> The moment you start trying to "process" data, it's time to put up with
> the verbosity of subprocess.Popen() so that you can use a wel
On Tue, 05 Feb 2013 21:01:56 +, Walter Hurry wrote:
> Hooray for common sense! Python is great, but it's silly to use Python
> (unless there is good reason) when a simple shell script will do the job.
A shell script is only the better option if (almost) the *only* thing the
script needs to d
On Feb 5, 2013 6:00 PM, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
> Chris Angelico wrote:
>
> > Python is not an "excellent option". It's a bad fit for shell
> > scripting, it just happens to be way better than a weak shell. Having
> > grown up on command.com, I found OS/2'
Chris Angelico wrote:
> Python is not an "excellent option". It's a bad fit for shell
> scripting, it just happens to be way better than a weak shell. Having
> grown up on command.com, I found OS/2's cmd.exe to be a massive
> improvement, and Windows's cmd.exe to be rather less impressive... but
>
On Tue, Feb 5, 2013 at 3:59 PM, Grant Edwards wrote:
> On 2013-02-05, Neil Cerutti wrote:
>> On 2013-02-05, Walter Hurry wrote:
Sorry, I'm a Linux guy. I have no clue what that means.
>>>
>>> Hooray for common sense! Python is great, but it's silly to use
>>> Python (unless there is good r
On Wed, Feb 6, 2013 at 10:00 AM, Grant Edwards wrote:
> On 2013-02-05, Ethan Furman wrote:
>> On 02/05/2013 01:39 PM, Neil Cerutti wrote:
>>> Python is an excellent option for writing shell scripts,
>>> particularly if your shell is cmd.exe.
>>
>> I believe having your shell be cmd.exe qualifies
On 2013-02-05, Ethan Furman wrote:
> On 02/05/2013 01:39 PM, Neil Cerutti wrote:
>> On 2013-02-05, Walter Hurry wrote:
Sorry, I'm a Linux guy. I have no clue what that means.
>>>
>>> Hooray for common sense! Python is great, but it's silly to use
>>> Python (unless there is good reason) whe
On 2013-02-05, Neil Cerutti wrote:
> On 2013-02-05, Walter Hurry wrote:
>>> Sorry, I'm a Linux guy. I have no clue what that means.
>>
>> Hooray for common sense! Python is great, but it's silly to use
>> Python (unless there is good reason) when a simple shell script
>> will do the job.
>
> Pyt
On 02/05/2013 01:39 PM, Neil Cerutti wrote:
On 2013-02-05, Walter Hurry wrote:
Sorry, I'm a Linux guy. I have no clue what that means.
Hooray for common sense! Python is great, but it's silly to use
Python (unless there is good reason) when a simple shell script
will do the job.
Python is
On 2013-02-05, Walter Hurry wrote:
>> Sorry, I'm a Linux guy. I have no clue what that means.
>
> Hooray for common sense! Python is great, but it's silly to use
> Python (unless there is good reason) when a simple shell script
> will do the job.
Python is an excellent option for writing shell s
On Tue, 05 Feb 2013 13:22:02 +, Grant Edwards wrote:
> On 2013-02-05, Anthony Correia wrote:
>
>> I need to pick up a language that would cover the Linux platform.
>
> Well, you haven't really described what it is you're trying to do, but
> it looks to me like bash and the usual set of shel
On 2013-02-05, Anthony Correia wrote:
> I need to pick up a language that would cover the Linux platform.
Well, you haven't really described what it is you're trying to do, but
it looks to me like bash and the usual set of shell utilities (e.g.
find) is what you need rather than Python.
> I u
On 2013-02-05, Terry Reedy wrote:
> On 2/4/2013 11:14 PM, Anthony Correia wrote:
>> I need to pick up a language that would cover the Linux platform. I use
>> Powershell for a scripting language on the Windows side of things. Very
>> simple copy files script. Is this the best way to do it?
>>
Am 05.02.2013 11:35, schrieb Peter Otten:
Ulrich Eckhardt wrote:
[...] use os.path.walk(), because that doesn't first build a list and
then iterate over the list but iterates over the single elements directly.
[...]
Not true. os.walk() uses os.listdir() internally.
Oh. 8|
Thanks for proofr
> - Original Message -
> > I need to pick up a language that would cover the Linux platform. I
> > use Powershell for a scripting language on the Windows side of
> > things. Very simple copy files script. Is this the best way to do
> > it?
Have you seen/checked http://pash.sourceforge
Ulrich Eckhardt wrote:
> separate variable but iterated over it directly. For large dirs, it
> could also be better to use os.path.walk(), because that doesn't first
> build a list and then iterate over the list but iterates over the single
> elements directly. This avoids the memory allocation ov
- Original Message -
> I need to pick up a language that would cover the Linux platform. I
> use Powershell for a scripting language on the Windows side of
> things. Very simple copy files script. Is this the best way to do
> it?
>
> import os
>
> objdir = ("C:\\temp2")
> colDi
Am 05.02.2013 05:14, schrieb Anthony Correia:
I need to pick up a language that would cover the Linux platform. I use
Powershell for a scripting language on the Windows side of things. Very simple
copy files script. Is this the best way to do it?
import os
objdir = ("C:\\temp2")
Dro
On 2/4/2013 11:14 PM, Anthony Correia wrote:
I need to pick up a language that would cover the Linux platform. I use
Powershell for a scripting language on the Windows side of things. Very simple
copy files script. Is this the best way to do it?
import os
objdir = ("C:\\temp2")
c
On 02/04/2013 09:14 PM, Anthony Correia wrote:
> I need to pick up a language that would cover the Linux platform. I
use Powershell for a scripting language on the Windows side of things.
Very simple copy files script. Is this the best way to do it?
>
> import os
>
> objdir = ("C:\\temp2")
>
I need to pick up a language that would cover the Linux platform. I use
Powershell for a scripting language on the Windows side of things. Very simple
copy files script. Is this the best way to do it?
import os
objdir = ("C:\\temp2")
colDir = os.listdir(objdir)
for f in colDir:
36 matches
Mail list logo