rez.utils.platform#
- class rez.utils.platform_.Platform#
Bases:
object
Abstraction of a platform.
- name = None#
- __init__()#
- arch(**kwargs)#
- os(**kwargs)#
- terminal_emulator_command()#
Returns the command to use to run another command in a separate terminal emulator.
The command is expected to have the target command and arguments appended to it.
- Returns:
List of strings, or None if the terminal emulator could not be determined.
- new_session_popen_args()#
Return the arguments to pass to subprocess.Popen in order to execute a shell in a new process group.
- Returns:
kwargs to pass to subprocess.Popen.
- Return type:
- image_viewer()#
Returns the system default image viewer.
If None, rez will use the web browser to display images.
- editor()#
Returns the system default text editor.
- difftool()#
Return the system default file diff tool.
- tmpdir()#
Return system default temporary directory path.
- physical_cores()#
Return the number of physical cpu cores on the system.
- logical_cores()#
Return the number of cpu cores as reported to the os.
May be different from physical_cores if, ie, intel’s hyperthreading is enabled.
- property has_case_sensitive_filesystem#
- symlink(source, link_name)#
Create a symbolic link pointing to source named link_name.
- class rez.utils.platform_.LinuxPlatform#
Bases:
_UnixPlatform
- name = 'linux'#
- __init__()#
- arch(**kwargs)#
- difftool()#
Return the system default file diff tool.
- editor()#
Returns the system default text editor.
- property has_case_sensitive_filesystem#
- image_viewer()#
Returns the system default image viewer.
If None, rez will use the web browser to display images.
- logical_cores()#
Return the number of cpu cores as reported to the os.
May be different from physical_cores if, ie, intel’s hyperthreading is enabled.
- new_session_popen_args()#
Return the arguments to pass to subprocess.Popen in order to execute a shell in a new process group.
- Returns:
kwargs to pass to subprocess.Popen.
- Return type:
- os(**kwargs)#
- physical_cores()#
Return the number of physical cpu cores on the system.
- symlink(source, link_name)#
Create a symbolic link pointing to source named link_name.
- terminal_emulator_command()#
Returns the command to use to run another command in a separate terminal emulator.
The command is expected to have the target command and arguments appended to it.
- Returns:
List of strings, or None if the terminal emulator could not be determined.
- tmpdir()#
Return system default temporary directory path.
- class rez.utils.platform_.OSXPlatform#
Bases:
_UnixPlatform
- name = 'osx'#
- __init__()#
- arch(**kwargs)#
- difftool()#
Return the system default file diff tool.
- editor()#
Returns the system default text editor.
- property has_case_sensitive_filesystem#
- image_viewer()#
Returns the system default image viewer.
If None, rez will use the web browser to display images.
- logical_cores()#
Return the number of cpu cores as reported to the os.
May be different from physical_cores if, ie, intel’s hyperthreading is enabled.
- new_session_popen_args()#
Return the arguments to pass to subprocess.Popen in order to execute a shell in a new process group.
- Returns:
kwargs to pass to subprocess.Popen.
- Return type:
- os(**kwargs)#
- physical_cores()#
Return the number of physical cpu cores on the system.
- symlink(source, link_name)#
Create a symbolic link pointing to source named link_name.
- terminal_emulator_command()#
Returns the command to use to run another command in a separate terminal emulator.
The command is expected to have the target command and arguments appended to it.
- Returns:
List of strings, or None if the terminal emulator could not be determined.
- tmpdir()#
Return system default temporary directory path.
- class rez.utils.platform_.WindowsPlatform#
Bases:
Platform
- name = 'windows'#
- property has_case_sensitive_filesystem#
- symlink(source, link_name)#
Create a symbolic link pointing to source named link_name.
- __init__()#
- arch(**kwargs)#
- difftool()#
Return the system default file diff tool.
- editor()#
Returns the system default text editor.
- image_viewer()#
Returns the system default image viewer.
If None, rez will use the web browser to display images.
- logical_cores()#
Return the number of cpu cores as reported to the os.
May be different from physical_cores if, ie, intel’s hyperthreading is enabled.
- new_session_popen_args()#
Return the arguments to pass to subprocess.Popen in order to execute a shell in a new process group.
- Returns:
kwargs to pass to subprocess.Popen.
- Return type:
- os(**kwargs)#
- physical_cores()#
Return the number of physical cpu cores on the system.
- terminal_emulator_command()#
Returns the command to use to run another command in a separate terminal emulator.
The command is expected to have the target command and arguments appended to it.
- Returns:
List of strings, or None if the terminal emulator could not be determined.
- tmpdir()#
Return system default temporary directory path.