Package schrodinger :: Package test :: Package stu :: Module sysinfo :: Class _SysInfo
[hide private]
[frames] | no frames]

Class _SysInfo

object --+
         |
        _SysInfo

Determines and saves the system information.


To Do: Does not support remote hosts from windows

Instance Methods [hide private]
 
__init__(self, host="localhost")
x.__init__(...) initializes x; see help(type(x)) for signature
 
get_host(self)
 
set_host(self, new_host)
 
name(self)
None
update(self, new_host='localhost')
Fills in the information based on the host name.
 
get_platform(self)
Finds the platform based on the execute host.
bool
isLinux(self)
Is this a Linux platform?
bool
isWindows(self)
Is this a Windows platform?
bool
isDarwin(self)
Is this a Darwin/Mac platform?
str
get_os_version(self)
Returns a string of os version information.
str
_runcmd(self, cmd)
Returns: String output of the cmd or schrodinger.utils.UKNOWN (str)
str
get_processor(self)
Returns a string of processor information.
 
toDict(self)
Dump sysinfo object as a dict
str
__str__(self)
Allows direct printing of the _SysInfo object.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  host = property(get_host, set_host)
Instance Variables [hide private]
  _host_entry_name
'Title from schrodinger.hosts
  _ssh_host_name
'Host' from schrodinger.hosts
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host="localhost")
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

name(self)

 
Decorators:
  • @property

isLinux(self)

 

Is this a Linux platform?

Returns: bool
Decorators:
  • @property

isWindows(self)

 

Is this a Windows platform?

Returns: bool
Decorators:
  • @property

isDarwin(self)

 

Is this a Darwin/Mac platform?

Returns: bool
Decorators:
  • @property

get_os_version(self)

 

Returns a string of os version information.

Uses python's platform.linux_distribution, platform.mac_ver, or platform.win32_ver for Linux, Mac and Windows, respectively.

Returns: str
OS version information.

_runcmd(self, cmd)

 
Parameters:
  • cmd (str) - command specified as a string. This function will prepend $SCHRODINGER/run and run appropriately local or remote.
Returns: str
String output of the cmd or schrodinger.utils.UKNOWN (str)

get_processor(self)

 

Returns a string of processor information.

Returns: str
Processor information (manufacturor, speed, etc.)

__str__(self)
(Informal representation operator)

 

Allows direct printing of the _SysInfo object.

Returns: str
Overrides: object.__str__