pdk.Util.Util ($Date: 2002/12/04 10:13:15 $)
index
pdk/Util/Util.py

Core pdk utilities.

FOG 10.2002

 
Functions
            
alloftype(sysType, sequence)
checks whether all elements of sequence are of the (Python) type sysType.
alltrue(sequence)
returns True if all elements in sequence evaluate to True.
appavailable()
check whether a wxPython app object has been created.
beep()
rings the PC internal bell.
getpackagedir(pkgName='pdk')
returns an existing or creates a new directory wher data for the package pkgName will be kept. First checks if an environment variable pkgName.upper() is defined; if not, uses the value of the environment variables USERHOME (on Windows) or HOME (on Unix) as a prefix.
getpdkdir()
returns the directory where pdk-specific data are kept (possibly creating it on the fly)
getusername()
returns the name of the current user. Under Windows, requires the win32api extension and returns "default", if no user is logged on.
guiavailable()
check whether a GUI (wxPython) has been loaded.
onlinux()
returns true, if the current machine runs Linux.
onwindows()
returns true, if the current machine runs MS Windows.
pdkappavailable()
check whether the pdk application framework has been initialized.
runcommand(cmdString)
runs cmdString in a command shell (using os.popen3). Raises an OSError if the execution generated output on sys.stderr; otherwise, the output generated on sys.stdout is returned.
timestamp(format='%y-%m-%d_%H%M')
returns a nicely formatted time stamp. The format can be overwritten with the format parameter.
 
Author
            
$Author: gathmann $