source: anuga_core/source/anuga/utilities/system_tools.py @ 4150

Last change on this file since 4150 was 3937, checked in by ole, 18 years ago

Fine tuned release script.

File size: 602 bytes
Line 
1"""Implementation of tools to do with system administration made as platform independent as possible.
2
3
4"""
5
6import sys
7import os
8
9def get_user_name():
10    """Get user name provide by operating system
11    """
12
13    if sys.platform == 'win32':
14        #user = os.getenv('USERPROFILE')
15        user = os.getenv('USERNAME')
16    else:
17        user = os.getenv('LOGNAME')
18
19
20    return user   
21
22def get_host_name():
23    """Get host name provide by operating system
24    """
25
26    if sys.platform == 'win32':
27        host = os.getenv('COMPUTERNAME')
28    else:
29        host = os.uname()[1]
30
31
32    return host   
Note: See TracBrowser for help on using the repository browser.