On Wed, 25 Sep 2013 03:50:18 -0700 (PDT)
"Edward K. Ream" <[email protected]> wrote:
> There is an unintended consequence to removing the \: continuation
> convention: abbreviations would have to be separated by blank lines. As a
Just so I understand, separating abbreviations by blank lines would be
bad because of all the blank lines needed for a series of short
one-liner abbreviations?
> def user_name():
> """get user's full name if available"""
> name = os.environ.get('LOGNAME') or ask('log name','my login name')
> if pwd:
> return pwd.getpwnam(name.pw_gecos.rstrip(',')
> else:
> return name
That looks better, although I don't really remember where the
pw_gecos comes from, Google recommended it no doubt.
http://stackoverflow.com/questions/842059/is-there-a-portable-way-to-get-the-current-username-in-python
just says
>>> import getpass
>>> getpass.getuser()
so I don't know how the rest of it got there.
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.