GNU bug report logs - #14366
24.3; Python os.getlogin does not work

Previous Next

Package: emacs;

Reported by: rajanikanth <at> gmail.com

Date: Wed, 8 May 2013 03:22:02 UTC

Severity: minor

Tags: notabug

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14366 in the body.
You can then email your comments to 14366 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14366; Package emacs. (Wed, 08 May 2013 03:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rajanikanth <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 May 2013 03:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: rajanikanth <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Python os.getlogin does not work
Date: Tue, 07 May 2013 23:19:10 -0400
Run python using:

M-x run-python (I used python 3.3.1). Once Python starts, run the
following:

import os
os.getlogin() and see the error

import os
>>> os.getlogin()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory

The above can be reproduced by running python in an emacs Shell too.

This does not happen when I run Python from normal shell (without
emacs):

Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getlogin()
'rajanikanth'




In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu)
 of 2013-05-07 on ubuntu
System Description:	Ubuntu 13.04

Configured using:
 `configure '--prefix=/home/rajanikanth/EMACS-24/' '--without-x''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Inferior Python

Minor modes in effect:
  compilation-shell-minor-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 1 ; 3 4 0 2 ; 0 c ESC x r u n - p y t h o n 
RET RET RET RET e x i t ( ) RET C-x 0 C-u ESC x r u 
n - p y t h o n RET DEL DEL DEL 3 . 3 TAB - i RET y 
i m p o r t SPC o s RET o s . g e t l o g i n ( ) RET 
ESC x r e p o r t - b u TAB RET

Recent messages:
("./emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
Sent python-shell-completion-setup-code
Sent python-ffap-setup-code
Sent python-eldoc-setup-code
Make dedicated process? (y or n)  y
Sent python-shell-completion-setup-code
Sent python-ffap-setup-code
Sent python-eldoc-setup-code

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils compile tool-bar python rx easymenu comint
regexp-opt ring ansi-color time-date ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14366; Package emacs. (Wed, 08 May 2013 07:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 14366 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: rajanikanth <at> gmail.com
Cc: 14366 <at> debbugs.gnu.org
Subject: Re: bug#14366: 24.3; Python os.getlogin does not work
Date: Wed, 08 May 2013 03:06:25 -0400
rajanikanth <at> gmail.com wrote:

>>>> os.getlogin()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> FileNotFoundError: [Errno 2] No such file or directory

Works for me. Found various old Python bugs related to this:

http://bugs.python.org/issue584566
http://bugs.python.org/issue1750013

> System Description:	Ubuntu 13.04




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14366; Package emacs. (Wed, 08 May 2013 22:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 14366 <at> debbugs.gnu.org (full text, mbox):

From: Rajanikanth Jammalamadaka <rajanikanth <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14366 <at> debbugs.gnu.org
Subject: Re: bug#14366: 24.3; Python os.getlogin does not work
Date: Wed, 8 May 2013 18:29:59 -0400
[Message part 1 (text/plain, inline)]
> > FileNotFoundError: [Errno 2] No such file or directory
>
> Works for me. Found various old Python bugs related to this:
>
> http://bugs.python.org/issue584566
> http://bugs.python.org/issue1750013
>
> > System Description:   Ubuntu 13.04
>

Thanks. Please close it. I will use pwd which is the recommended module:

>>> pwd.getpwuid(os.getuid())[0]
pwd.getpwuid(os.getuid())[0]
'rajanikanth'

Thanks,
Raj

-- 
Rajanikanth
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 08 May 2013 23:10:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14366 <at> debbugs.gnu.org and rajanikanth <at> gmail.com Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 08 May 2013 23:10:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Jun 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.