Function for the path of the script?

S

Steven D'Aprano

This was pointed out before but since you said you ignore posts from GG
you probably missed it, and will probably miss this one too, and thus
continue to post bad information.

This is a small but illustrative example of why such broad- brush
filtering is a bad idea. But it is your choice.

Yes, it is unfortunate that somebody such as yourself who takes the time
to post well using Google Groups gets tared with the same brush as those
who don't, but then as my granny used to say, if you lie down with dogs
you'll get fleas.

If you don't want to be associated with the typical GG posts, you have
the choice to stop using GG. And just as you make the choice that the
convenience of GG outweighs the annoyance of being filtered, I expect
Grant has made the choice that the convenience of avoiding unwanted GG
posts outweighs the risk of throwing out a useful post or two.

Isn't freedom of choice wonderful? No matter what you choose, you'll
annoy somebody, possibly yourself :)
 
P

Peter Cacioppi

Steven said

"Isn't freedom of choice wonderful?"

Didn't somebody once say "we're all adults here". I forget who said that. Eddard Stark? The guy always did keep his head in a crisis.
 
G

Grant Edwards

Grant Edwards said:
If you have a utility that can be used to do several related things,
one way to tell that utility which you want to do is with command line
arguments.

That's a case for inspecting the command line.
For example your utility checks sys.argv[1] for a command or option
flag. Another way is to give the file multiple names, and check
sys.argv[0] to see what name you've been invoked under.

Exactly so. This isn't a use case for finding the filesystem location
of the module.

Indeed. I was answering a question about a use case knowing the
_filename_, not the path for the file.
 
G

Grant Edwards

This was pointed out before but since you said you ignore posts from GG
you probably missed it, and will probably miss this one too, and thus
continue to post bad information.

This is a small but illustrative example of why such broad- brush
filtering is a bad idea. But it is your choice.
[...]

If you don't want to be associated with the typical GG posts, you
have the choice to stop using GG. And just as you make the choice
that the convenience of GG outweighs the annoyance of being filtered,
I expect Grant has made the choice that the convenience of avoiding
unwanted GG posts outweighs the risk of throwing out a useful post or
two.

At the time I made that choice there was a significant problem with
spam being sent using GG posts. I'm told that the list server
attempted to filter out those posts, but those of us who read this via
Usenet got the full broadside of ads and scams. Based on the S/N
ratio of non-spam GG posts, the choice was pretty obvious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,215
Messages
2,571,113
Members
47,716
Latest member
MiloManley

Latest Threads

Top