Trees | Index | Help |
---|
Package flumotion :: Package common :: Module common |
|
Function Summary | |
---|---|
Get the host name of an IPv4 address. | |
Get the port number of an IPv4 address. | |
Return a string representing the given args. | |
Check if the given pid is currently running. | |
boolean |
Check if the given local port is free to accept on. |
boolean |
Check if the given remote host/port is accepting connections. |
Create a path string out of the name of a component and its parent. | |
This forks the current process into a daemon. | |
Delete the pid file in the run directory, using the given process type and process name for the filename. | |
Ensure the given directory exists, creating it if not. | |
string |
Nicely formats a storage size using SI units. |
string |
Nicely format time in a human-readable format. |
int |
Get the first free port, starting from the given port. |
Return the (at most) two-letter language code set for message translation. | |
Get the pid from the pid file in the run directory, using the given process type and process name for the filename. | |
Get the full path to the pid file for the given process type and name. | |
Returns a method you can use as _ to translate strings for the given domain. | |
Send the given process a KILL signal. | |
Merge the __implements__ tuples of the given classes into one tuple. | |
Return a string giving the fully qualified class of the given object. | |
Convert the given (relative) path to the python module it would have to be imported as. | |
Send the given process a TERM signal. | |
Print a version block for the flumotion binaries. | |
Wait until we get killed by a TERM signal (from someone else). | |
Wait for the given process type and name to have started and created a pid file. | |
Write a pid file in the run directory, using the given process type and process name for the filename. |
Function Details |
---|
addressGetHost(a)Get the host name of an IPv4 address.
|
addressGetPort(a)Get the port number of an IPv4 address.
|
argRepr(args=(), kwargs={}, max=-1)Return a string representing the given args. |
checkPidRunning(pid)Check if the given pid is currently running.
|
checkPortFree(port)Check if the given local port is free to accept on.
|
checkRemotePort(host, port)Check if the given remote host/port is accepting connections.
|
componentPath(componentName, parentName)Create a path string out of the name of a component and its parent. |
daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')This forks the current process into a daemon. The stdin, stdout, and stderr arguments are file names that will be opened and be used to replace the standard file descriptors in sys.stdin, sys.stdout, and sys.stderr. These arguments are optional and default to /dev/null. Note that stderr is opened unbuffered, so if it shares a file with stdout then interleaved output may not appear in the order that you expect. |
deletePidFile(type, name)Delete the pid file in the run directory, using the given process type and process name for the filename. |
ensureDir(dir, description)Ensure the given directory exists, creating it if not. Raises a SystemError if this fails, including the given description. |
formatStorage(units, precision=2)Nicely formats a storage size using SI units. See Wikipedia and other sources for rationale. Prefixes are k, M, G, ... Sizes are powers of 10. Actual result should be suffixed with bit or byte, not b or B.
|
formatTime(seconds)Nicely format time in a human-readable format. Will chunks weeks, days, hours and minutes.
|
getFirstFreePort(startPort)Get the first free port, starting from the given port.
|
getLL()Return the (at most) two-letter language code set for message translation. |
getPid(type, name)Get the pid from the pid file in the run directory, using the given process type and process name for the filename.
|
getPidPath(type, name)Get the full path to the pid file for the given process type and name. |
gettexter(domain)Returns a method you can use as _ to translate strings for the given domain. |
killPid(pid)Send the given process a KILL signal.
|
mergeImplements(*classes)Merge the __implements__ tuples of the given classes into one tuple. |
objRepr(object)Return a string giving the fully qualified class of the given object. |
pathToModuleName(path)Convert the given (relative) path to the python module it would have to be imported as. Return None if the path is not a valid python module |
termPid(pid)Send the given process a TERM signal.
|
version(binary)Print a version block for the flumotion binaries.
|
waitForTerm()Wait until we get killed by a TERM signal (from someone else). |
waitPidFile(type, name)Wait for the given process type and name to have started and created a pid file. Return the pid. |
writePidFile(type, name)Write a pid file in the run directory, using the given process type and process name for the filename. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Dec 20 15:33:10 2005 | http://epydoc.sf.net |