A little disappointed so far

Gerrit Holl gerrit at nl.linux.org
Mon May 19 10:12:09 EDT 2003


<quote name="Erik Max Francis" date="1053276419" email="max at alcyone.com">
> > I am
> > not a huge fan of perl, because of its inbuilt "obfuscability", but I
> > can
> > quickly get things done, like stripping off the pathname of my
> > program, so
> > argv[0] is progname, not ./progname, or /usr/local/bin/progname.
> 
> There's a function which does this:  os.path.split.

I think os.path.basename is even better. Perl would need regexp,
wouldn't it?

> > I'm just parsing some options (I don't like getopts, and parsing a
> > command
> > line ought to be easy).

Maybe you are not yet accustomed to Python. In Python, you use a module
to save problems, no obfuscated regexps.

Have you looked at optparse, in Python 2.3, yet? It's really great!

> > A few things seem very hard - so, should I persevere?

What is?
</quote>

yours,
Gerrit.

-- 
Mozilla _is_ the web: it grows faster than you can download it.
1011001 1101111 1110101 1110010 1110011 0101100
1000111 1100101 1110010 1110010 1101001 1110100





More information about the Python-list mailing list