Part of bzrlib
Only one dependency: ctypes should be installed.
Function | debug_memory_win32api | Use trace.note() to dump the running memory info. |
Function | get_console_size | Return size of current console. |
Function | get_appdata_location | Return Application Data location. |
Function | get_local_appdata_location | Return Local Application Data location. |
Function | get_home_location | Return user's home location. |
Function | get_user_name | Return user name as login name. |
Function | get_host_name | Return host machine name. |
Function | get_appdata_location_unicode | Undocumented |
Function | get_home_location_unicode | Undocumented |
Function | get_user_name_unicode | Undocumented |
Function | get_host_name_unicode | Undocumented |
Function | glob_one | Same as glob.glob(). |
Function | glob_expand | Replacement for glob expansion by the shell. |
Function | get_app_path | Look up in Windows registry for full path to application executable. |
Function | set_file_attr_hidden | Set file attributes to hidden if possible |
Function | get_unicode_argv | Undocumented |
Function | _get_sh_special_folder_path | Call SHGetSpecialFolderPathW if available, or return None. |
Function | _ensure_unicode | Undocumented |
Function | _ensure_with_dir | Undocumented |
Function | _undo_ensure_with_dir | Undocumented |
Function | _command_line_to_argv | Convert a Unicode command line into a list of argv arguments. |
Function | _pywin32_is_local_pid_dead | True if pid doesn't correspond to live process on this machine |
Function | _ctypes_is_local_pid_dead | True if pid doesn't correspond to live process on this machine |
This function try to determine actual size of current working console window and return tuple (sizex, sizey) if success, or default size (defaultx, defaulty) otherwise.
Result is always unicode (or None).
Windows defines two 'Application Data' folders per user - a 'roaming' one that moves with the user as they logon to different machines, and a 'local' one that stays local to the machine. This returns the 'roaming' directory, and thus is suitable for storing user-preferences, etc.
Returned value can be unicode or plain string. To convert plain string to unicode use s.decode(osutils.get_user_encoding()) (XXX - but see bug 262874, which asserts the correct encoding is 'mbcs')
Windows defines two 'Application Data' folders per user - a 'roaming' one that moves with the user as they logon to different machines, and a 'local' one that stays local to the machine. This returns the 'local' directory, and thus is suitable for caches, temp files and other things which don't need to move with the user.
Returned value can be unicode or plain string. To convert plain string to unicode use s.decode(osutils.get_user_encoding()) (XXX - but see bug 262874, which asserts the correct encoding is 'mbcs')
Returned value can be unicode or plain string. To convert plain string to unicode use s.decode(osutils.get_user_encoding())
Returns | A unicode string representing the host name. On win98, this may be a plain string as win32 api doesn't support unicode. |
work around bugs in glob.glob() - Python bug #1001604 ("glob doesn't return unicode with ...") - failing expansion for / with non-iso-8859-* chars
Win32's cmd.exe does not do glob expansion (eg *.py), so we do our own here.
Introduced in bzrlib 0.18.
Parameters | file_list | A list of filenames which may include shell globs. |
Returns | An expanded list of filenames. |
Parameters | appname | name of application (if no filename extension is specified, .exe used) |
Returns | full path to aplication executable from registry, or appname itself if nothing found. |
It performs wildcard expansion to make wildcards act closer to how they work in posix shells, versus how they work by default on Windows. Quoted arguments are left untouched.
Parameters | command_line | The unicode string to split into an arg list. |
single_quotes_allowed | Whether single quotes are accepted as quoting characters like double quotes. False by default. | |
Returns | A list of unicode strings. |