Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [OT] Re: output from external commands

Reply
Thread Tools

[OT] Re: output from external commands

 
 
darren kirby
Guest
Posts: n/a
 
      10-25-2005
quoth the Fredrik Lundh:
> (using either on the output from glob.glob is just plain silly, of course)


Silly? Sure. os.listdir() is more on point. Never said I was the smartest.
However, I will defend my post by pointing out that at the time it was the
only one that actually included code that did what the OP wanted.

Recall I wrote:
"If all you want is filenames this will work:"
not:
"This is how you should do it"

And I invite you to prove me wrong ... it does work.

As a novice, I do appreciate getting set strait when I code something dumb,
but going off about the efficiency of "%s % foo" over "str(foo)" hardly helps
the OP, and is not very pertinant to my glob faux pas either. An explanation
of why glob is silly would perhaps teach me better than just stating it as
fact.

It is things like this that make me wary of posting to this list, either to
help another, or with my own q's. All I usually want is help with a specific
problem, not a critique involving how brain-dead my code is. I'm a beginner,
of course my code is going to be brain-dead

I thought the idea was "make it work first, then optimize"? In any event, I
will refrain from trying to help people here until I get over this silly
stage I seem to be stuck in... it just doesn't seem worth it.

I am not trying to sound like a whiner here, I just wish you experts would go
easy on us novices...

-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDXZLEwPD5Cr/3CJgRApVvAKDGxAAb+U/fFaZdvnp8PHKKFpjx/ACeNITx
xc+hbR7fpQN7gSomL+8C6Do=
=aPD1
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Steven Bethard
Guest
Posts: n/a
 
      10-25-2005
darren kirby wrote:
> quoth the Fredrik Lundh:
>
>>(using either on the output from glob.glob is just plain silly, of course)

>

[snip]
>
> It is things like this that make me wary of posting to this list, either to
> help another, or with my own q's. All I usually want is help with a specific
> problem, not a critique involving how brain-dead my code is. I'm a beginner,
> of course my code is going to be brain-dead


I wouldn't fret too much about a sharp remark from Fredrik Lundh.
They're pretty much all that way. It looks like you already did the
right thing - read past the insults, and gleaned the useful information
that he included in between. It takes a little training to get used to
him, but if you can look past the nasty bite, he's really a valuable
resource around here.

STeVe
 
Reply With Quote
 
 
 
 
Tony Meyer
Guest
Posts: n/a
 
      10-25-2005
On 25/10/2005, at 3:36 PM, Steven Bethard wrote:

> I wouldn't fret too much about a sharp remark from Fredrik Lundh.
> They're pretty much all that way. [...] It takes a little
> training to get used to
> him, but if you can look past the nasty bite, he's really a valuable
> resource around here.


+1 QOTW

=Tony.Meyer

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [OT] Re: output from external commands Terry Hancock Python 2 10-26-2005 12:53 AM
Re: output from external commands darren kirby Python 6 10-24-2005 09:14 PM
output from external commands James Colannino Python 2 10-24-2005 05:27 AM
capturing the output of external commands Avi Kak Python 4 07-26-2004 03:16 AM
Re: man pages for C commands (GCC commands) Ben Pfaff C Programming 4 06-28-2003 06:21 PM



Advertisments