Ignore:
Timestamp:
Mar 17, 2013, 10:16:24 PM (12 years ago)
Author:
steve
Message:

Changed get_user_name using getpass as suggested by Roberto Vidmar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/system_tools.py

    r8299 r8764  
    3636    """
    3737
    38     if sys.platform == 'win32':
    39         #user = os.getenv('USERPROFILE')
    40         user = os.getenv('USERNAME')
    41     else:
    42         user = os.getenv('LOGNAME')
     38    import getpass
     39    user = getpass.getuser()
     40
     41    #if sys.platform == 'win32':
     42    #    #user = os.getenv('USERPROFILE')
     43    #    user = os.getenv('USERNAME')
     44    #else:
     45    #    user = os.getenv('LOGNAME')
    4346
    4447
Note: See TracChangeset for help on using the changeset viewer.