Commit 8c4f137c authored by cvs2svn's avatar cvs2svn
Browse files

This commit was manufactured by cvs2svn to create tag 'COOL_2_7_0'.

git-svn-id: file:///git/lcgcool.svndb/cool/tags/COOL_2_7_0@15595 4525493e-7705-40b1-a816-d608a930855b
parent 395a6c1f
#============================================================================
# $ Id: requirements,v 1.1 2005/08/19 10:22:00 marcocle Exp $
#============================================================================
package PyCoolUtilities
#============================================================================
#============================================================================
# Public dependencies
#============================================================================
use PyCool v*
#============================================================================
# Build rules
#============================================================================
include_path none
#============================================================================
private
#============================================================================
#============================================================================
# Tests
#============================================================================
apply_pattern lcg_test_python
# Fake target for examples
action examples "echo No examples in this package"
macro_remove cmt_actions_constituents "examples"
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module PyCoolConsole</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>PyCoolConsole</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolConsole.py">/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolConsole.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="atexit.html">atexit</a><br>
<a href="code.html">code</a><br>
</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
<a href="readline.html">readline</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="code.html#InteractiveConsole">code.InteractiveConsole</a>(<a href="code.html#InteractiveInterpreter">code.InteractiveInterpreter</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="PyCoolConsole.html#HistoryConsole">HistoryConsole</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="PyCoolConsole.html#PyCoolConsole">PyCoolConsole</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="HistoryConsole">class <strong>HistoryConsole</strong></a>(<a href="code.html#InteractiveConsole">code.InteractiveConsole</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="PyCoolConsole.html#HistoryConsole">HistoryConsole</a></dd>
<dd><a href="code.html#InteractiveConsole">code.InteractiveConsole</a></dd>
<dd><a href="code.html#InteractiveInterpreter">code.InteractiveInterpreter</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="HistoryConsole-__init__"><strong>__init__</strong></a>(self, locals<font color="#909090">=None</font>, filename<font color="#909090">='&lt;console&gt;'</font>, histfile<font color="#909090">='/afs/cern.ch/user/m/marcocle/.coolconsole_hist'</font>)</dt></dl>
<dl><dt><a name="HistoryConsole-init_history"><strong>init_history</strong></a>(self, histfile)</dt></dl>
<dl><dt><a name="HistoryConsole-save_history"><strong>save_history</strong></a>(self, histfile)</dt></dl>
<hr>
Methods inherited from <a href="code.html#InteractiveConsole">code.InteractiveConsole</a>:<br>
<dl><dt><a name="HistoryConsole-interact"><strong>interact</strong></a>(self, banner<font color="#909090">=None</font>)</dt><dd><tt>Closely&nbsp;emulate&nbsp;the&nbsp;interactive&nbsp;Python&nbsp;console.<br>
&nbsp;<br>
The&nbsp;optional&nbsp;banner&nbsp;argument&nbsp;specify&nbsp;the&nbsp;banner&nbsp;to&nbsp;print<br>
before&nbsp;the&nbsp;first&nbsp;interaction;&nbsp;by&nbsp;default&nbsp;it&nbsp;prints&nbsp;a&nbsp;banner<br>
similar&nbsp;to&nbsp;the&nbsp;one&nbsp;printed&nbsp;by&nbsp;the&nbsp;real&nbsp;Python&nbsp;interpreter,<br>
followed&nbsp;by&nbsp;the&nbsp;current&nbsp;class&nbsp;name&nbsp;in&nbsp;parentheses&nbsp;(so&nbsp;as&nbsp;not<br>
to&nbsp;confuse&nbsp;this&nbsp;with&nbsp;the&nbsp;real&nbsp;interpreter&nbsp;--&nbsp;since&nbsp;it's&nbsp;so<br>
close!).</tt></dd></dl>
<dl><dt><a name="HistoryConsole-push"><strong>push</strong></a>(self, line)</dt><dd><tt>Push&nbsp;a&nbsp;line&nbsp;to&nbsp;the&nbsp;interpreter.<br>
&nbsp;<br>
The&nbsp;line&nbsp;should&nbsp;not&nbsp;have&nbsp;a&nbsp;trailing&nbsp;newline;&nbsp;it&nbsp;may&nbsp;have<br>
internal&nbsp;newlines.&nbsp;&nbsp;The&nbsp;line&nbsp;is&nbsp;appended&nbsp;to&nbsp;a&nbsp;buffer&nbsp;and&nbsp;the<br>
interpreter's&nbsp;<a href="#HistoryConsole-runsource">runsource</a>()&nbsp;method&nbsp;is&nbsp;called&nbsp;with&nbsp;the<br>
concatenated&nbsp;contents&nbsp;of&nbsp;the&nbsp;buffer&nbsp;as&nbsp;source.&nbsp;&nbsp;If&nbsp;this<br>
indicates&nbsp;that&nbsp;the&nbsp;command&nbsp;was&nbsp;executed&nbsp;or&nbsp;invalid,&nbsp;the&nbsp;buffer<br>
is&nbsp;reset;&nbsp;otherwise,&nbsp;the&nbsp;command&nbsp;is&nbsp;incomplete,&nbsp;and&nbsp;the&nbsp;buffer<br>
is&nbsp;left&nbsp;as&nbsp;it&nbsp;was&nbsp;after&nbsp;the&nbsp;line&nbsp;was&nbsp;appended.&nbsp;&nbsp;The&nbsp;return<br>
value&nbsp;is&nbsp;1&nbsp;if&nbsp;more&nbsp;input&nbsp;is&nbsp;required,&nbsp;0&nbsp;if&nbsp;the&nbsp;line&nbsp;was&nbsp;dealt<br>
with&nbsp;in&nbsp;some&nbsp;way&nbsp;(this&nbsp;is&nbsp;the&nbsp;same&nbsp;as&nbsp;<a href="#HistoryConsole-runsource">runsource</a>()).</tt></dd></dl>
<dl><dt><a name="HistoryConsole-raw_input"><strong>raw_input</strong></a>(self, prompt<font color="#909090">=''</font>)</dt><dd><tt>Write&nbsp;a&nbsp;prompt&nbsp;and&nbsp;read&nbsp;a&nbsp;line.<br>
&nbsp;<br>
The&nbsp;returned&nbsp;line&nbsp;does&nbsp;not&nbsp;include&nbsp;the&nbsp;trailing&nbsp;newline.<br>
When&nbsp;the&nbsp;user&nbsp;enters&nbsp;the&nbsp;EOF&nbsp;key&nbsp;sequence,&nbsp;EOFError&nbsp;is&nbsp;raised.<br>
&nbsp;<br>
The&nbsp;base&nbsp;implementation&nbsp;uses&nbsp;the&nbsp;built-in&nbsp;function<br>
<a href="#HistoryConsole-raw_input">raw_input</a>();&nbsp;a&nbsp;subclass&nbsp;may&nbsp;replace&nbsp;this&nbsp;with&nbsp;a&nbsp;different<br>
implementation.</tt></dd></dl>
<dl><dt><a name="HistoryConsole-resetbuffer"><strong>resetbuffer</strong></a>(self)</dt><dd><tt>Reset&nbsp;the&nbsp;input&nbsp;buffer.</tt></dd></dl>
<hr>
Methods inherited from <a href="code.html#InteractiveInterpreter">code.InteractiveInterpreter</a>:<br>
<dl><dt><a name="HistoryConsole-runcode"><strong>runcode</strong></a>(self, code)</dt><dd><tt>Execute&nbsp;a&nbsp;code&nbsp;object.<br>
&nbsp;<br>
When&nbsp;an&nbsp;exception&nbsp;occurs,&nbsp;<a href="#HistoryConsole-showtraceback">showtraceback</a>()&nbsp;is&nbsp;called&nbsp;to<br>
display&nbsp;a&nbsp;traceback.&nbsp;&nbsp;All&nbsp;exceptions&nbsp;are&nbsp;caught&nbsp;except<br>
SystemExit,&nbsp;which&nbsp;is&nbsp;reraised.<br>
&nbsp;<br>
A&nbsp;note&nbsp;about&nbsp;KeyboardInterrupt:&nbsp;this&nbsp;exception&nbsp;may&nbsp;occur<br>
elsewhere&nbsp;in&nbsp;this&nbsp;code,&nbsp;and&nbsp;may&nbsp;not&nbsp;always&nbsp;be&nbsp;caught.&nbsp;&nbsp;The<br>
caller&nbsp;should&nbsp;be&nbsp;prepared&nbsp;to&nbsp;deal&nbsp;with&nbsp;it.</tt></dd></dl>
<dl><dt><a name="HistoryConsole-runsource"><strong>runsource</strong></a>(self, source, filename<font color="#909090">='&lt;input&gt;'</font>, symbol<font color="#909090">='single'</font>)</dt><dd><tt>Compile&nbsp;and&nbsp;run&nbsp;some&nbsp;source&nbsp;in&nbsp;the&nbsp;interpreter.<br>
&nbsp;<br>
Arguments&nbsp;are&nbsp;as&nbsp;for&nbsp;compile_command().<br>
&nbsp;<br>
One&nbsp;several&nbsp;things&nbsp;can&nbsp;happen:<br>
&nbsp;<br>
1)&nbsp;The&nbsp;input&nbsp;is&nbsp;incorrect;&nbsp;compile_command()&nbsp;raised&nbsp;an<br>
exception&nbsp;(SyntaxError&nbsp;or&nbsp;OverflowError).&nbsp;&nbsp;A&nbsp;syntax&nbsp;traceback<br>
will&nbsp;be&nbsp;printed&nbsp;by&nbsp;calling&nbsp;the&nbsp;<a href="#HistoryConsole-showsyntaxerror">showsyntaxerror</a>()&nbsp;method.<br>
&nbsp;<br>
2)&nbsp;The&nbsp;input&nbsp;is&nbsp;incomplete,&nbsp;and&nbsp;more&nbsp;input&nbsp;is&nbsp;required;<br>
compile_command()&nbsp;returned&nbsp;None.&nbsp;&nbsp;Nothing&nbsp;happens.<br>
&nbsp;<br>
3)&nbsp;The&nbsp;input&nbsp;is&nbsp;complete;&nbsp;compile_command()&nbsp;returned&nbsp;a&nbsp;code<br>
object.&nbsp;&nbsp;The&nbsp;code&nbsp;is&nbsp;executed&nbsp;by&nbsp;calling&nbsp;<a href="#HistoryConsole-runcode">runcode</a>()&nbsp;(which<br>
also&nbsp;handles&nbsp;run-time&nbsp;exceptions,&nbsp;except&nbsp;for&nbsp;SystemExit).<br>
&nbsp;<br>
The&nbsp;return&nbsp;value&nbsp;is&nbsp;True&nbsp;in&nbsp;case&nbsp;2,&nbsp;False&nbsp;in&nbsp;the&nbsp;other&nbsp;cases&nbsp;(unless<br>
an&nbsp;exception&nbsp;is&nbsp;raised).&nbsp;&nbsp;The&nbsp;return&nbsp;value&nbsp;can&nbsp;be&nbsp;used&nbsp;to<br>
decide&nbsp;whether&nbsp;to&nbsp;use&nbsp;sys.ps1&nbsp;or&nbsp;sys.ps2&nbsp;to&nbsp;prompt&nbsp;the&nbsp;next<br>
line.</tt></dd></dl>
<dl><dt><a name="HistoryConsole-showsyntaxerror"><strong>showsyntaxerror</strong></a>(self, filename<font color="#909090">=None</font>)</dt><dd><tt>Display&nbsp;the&nbsp;syntax&nbsp;error&nbsp;that&nbsp;just&nbsp;occurred.<br>
&nbsp;<br>
This&nbsp;doesn't&nbsp;display&nbsp;a&nbsp;stack&nbsp;trace&nbsp;because&nbsp;there&nbsp;isn't&nbsp;one.<br>
&nbsp;<br>
If&nbsp;a&nbsp;filename&nbsp;is&nbsp;given,&nbsp;it&nbsp;is&nbsp;stuffed&nbsp;in&nbsp;the&nbsp;exception&nbsp;instead<br>
of&nbsp;what&nbsp;was&nbsp;there&nbsp;before&nbsp;(because&nbsp;Python's&nbsp;parser&nbsp;always&nbsp;uses<br>
"&lt;string&gt;"&nbsp;when&nbsp;reading&nbsp;from&nbsp;a&nbsp;string).<br>
&nbsp;<br>
The&nbsp;output&nbsp;is&nbsp;written&nbsp;by&nbsp;<a href="#HistoryConsole-write">write</a>(),&nbsp;below.</tt></dd></dl>
<dl><dt><a name="HistoryConsole-showtraceback"><strong>showtraceback</strong></a>(self)</dt><dd><tt>Display&nbsp;the&nbsp;exception&nbsp;that&nbsp;just&nbsp;occurred.<br>
&nbsp;<br>
We&nbsp;remove&nbsp;the&nbsp;first&nbsp;stack&nbsp;item&nbsp;because&nbsp;it&nbsp;is&nbsp;our&nbsp;own&nbsp;code.<br>
&nbsp;<br>
The&nbsp;output&nbsp;is&nbsp;written&nbsp;by&nbsp;<a href="#HistoryConsole-write">write</a>(),&nbsp;below.</tt></dd></dl>
<dl><dt><a name="HistoryConsole-write"><strong>write</strong></a>(self, data)</dt><dd><tt>Write&nbsp;a&nbsp;string.<br>
&nbsp;<br>
The&nbsp;base&nbsp;implementation&nbsp;writes&nbsp;to&nbsp;sys.stderr;&nbsp;a&nbsp;subclass&nbsp;may<br>
replace&nbsp;this&nbsp;with&nbsp;a&nbsp;different&nbsp;implementation.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PyCoolConsole">class <strong>PyCoolConsole</strong></a>(<a href="PyCoolConsole.html#HistoryConsole">HistoryConsole</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="PyCoolConsole.html#PyCoolConsole">PyCoolConsole</a></dd>
<dd><a href="PyCoolConsole.html#HistoryConsole">HistoryConsole</a></dd>
<dd><a href="code.html#InteractiveConsole">code.InteractiveConsole</a></dd>
<dd><a href="code.html#InteractiveInterpreter">code.InteractiveInterpreter</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="PyCoolConsole-__init__"><strong>__init__</strong></a>(self, connectString<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="PyCoolConsole-command_exit"><strong>command_exit</strong></a>(self)</dt></dl>
<dl><dt><a name="PyCoolConsole-command_help"><strong>command_help</strong></a>(self, argumentString)</dt></dl>
<dl><dt><a name="PyCoolConsole-command_less"><strong>command_less</strong></a>(self, argumentString)</dt></dl>
<dl><dt><a name="PyCoolConsole-command_ls"><strong>command_ls</strong></a>(self, argumentString)</dt></dl>
<dl><dt><a name="PyCoolConsole-command_open"><strong>command_open</strong></a>(self, argumentString)</dt></dl>
<dl><dt><a name="PyCoolConsole-createInterpreterCommand"><strong>createInterpreterCommand</strong></a>(self, command, argumentString)</dt></dl>
<dl><dt><a name="PyCoolConsole-interact"><strong>interact</strong></a>(self)</dt></dl>
<dl><dt><a name="PyCoolConsole-parseLine"><strong>parseLine</strong></a>(self, line)</dt></dl>
<dl><dt><a name="PyCoolConsole-push"><strong>push</strong></a>(self, line)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>banner</strong> = "Welcome to CoolConsole. Type 'help' for instructions."</dl>
<dl><dt><strong>commands</strong> = {'exit': 'quit the interpreter session', 'help': 'help overview', 'less': 'list contents of folders, e.g. less "/a"', 'ls': 'list contents of foldersets, e.g. ls "/"', 'open': "open the specified database, e.g. open 'sqlite://...'", 'quit': 'alias for exit'}</dl>
<hr>
Methods inherited from <a href="PyCoolConsole.html#HistoryConsole">HistoryConsole</a>:<br>
<dl><dt><a name="PyCoolConsole-init_history"><strong>init_history</strong></a>(self, histfile)</dt></dl>
<dl><dt><a name="PyCoolConsole-save_history"><strong>save_history</strong></a>(self, histfile)</dt></dl>
<hr>
Methods inherited from <a href="code.html#InteractiveConsole">code.InteractiveConsole</a>:<br>
<dl><dt><a name="PyCoolConsole-raw_input"><strong>raw_input</strong></a>(self, prompt<font color="#909090">=''</font>)</dt><dd><tt>Write&nbsp;a&nbsp;prompt&nbsp;and&nbsp;read&nbsp;a&nbsp;line.<br>
&nbsp;<br>
The&nbsp;returned&nbsp;line&nbsp;does&nbsp;not&nbsp;include&nbsp;the&nbsp;trailing&nbsp;newline.<br>
When&nbsp;the&nbsp;user&nbsp;enters&nbsp;the&nbsp;EOF&nbsp;key&nbsp;sequence,&nbsp;EOFError&nbsp;is&nbsp;raised.<br>
&nbsp;<br>
The&nbsp;base&nbsp;implementation&nbsp;uses&nbsp;the&nbsp;built-in&nbsp;function<br>
<a href="#PyCoolConsole-raw_input">raw_input</a>();&nbsp;a&nbsp;subclass&nbsp;may&nbsp;replace&nbsp;this&nbsp;with&nbsp;a&nbsp;different<br>
implementation.</tt></dd></dl>
<dl><dt><a name="PyCoolConsole-resetbuffer"><strong>resetbuffer</strong></a>(self)</dt><dd><tt>Reset&nbsp;the&nbsp;input&nbsp;buffer.</tt></dd></dl>
<hr>
Methods inherited from <a href="code.html#InteractiveInterpreter">code.InteractiveInterpreter</a>:<br>
<dl><dt><a name="PyCoolConsole-runcode"><strong>runcode</strong></a>(self, code)</dt><dd><tt>Execute&nbsp;a&nbsp;code&nbsp;object.<br>
&nbsp;<br>
When&nbsp;an&nbsp;exception&nbsp;occurs,&nbsp;<a href="#PyCoolConsole-showtraceback">showtraceback</a>()&nbsp;is&nbsp;called&nbsp;to<br>
display&nbsp;a&nbsp;traceback.&nbsp;&nbsp;All&nbsp;exceptions&nbsp;are&nbsp;caught&nbsp;except<br>
SystemExit,&nbsp;which&nbsp;is&nbsp;reraised.<br>
&nbsp;<br>
A&nbsp;note&nbsp;about&nbsp;KeyboardInterrupt:&nbsp;this&nbsp;exception&nbsp;may&nbsp;occur<br>
elsewhere&nbsp;in&nbsp;this&nbsp;code,&nbsp;and&nbsp;may&nbsp;not&nbsp;always&nbsp;be&nbsp;caught.&nbsp;&nbsp;The<br>
caller&nbsp;should&nbsp;be&nbsp;prepared&nbsp;to&nbsp;deal&nbsp;with&nbsp;it.</tt></dd></dl>
<dl><dt><a name="PyCoolConsole-runsource"><strong>runsource</strong></a>(self, source, filename<font color="#909090">='&lt;input&gt;'</font>, symbol<font color="#909090">='single'</font>)</dt><dd><tt>Compile&nbsp;and&nbsp;run&nbsp;some&nbsp;source&nbsp;in&nbsp;the&nbsp;interpreter.<br>
&nbsp;<br>
Arguments&nbsp;are&nbsp;as&nbsp;for&nbsp;compile_command().<br>
&nbsp;<br>
One&nbsp;several&nbsp;things&nbsp;can&nbsp;happen:<br>
&nbsp;<br>
1)&nbsp;The&nbsp;input&nbsp;is&nbsp;incorrect;&nbsp;compile_command()&nbsp;raised&nbsp;an<br>
exception&nbsp;(SyntaxError&nbsp;or&nbsp;OverflowError).&nbsp;&nbsp;A&nbsp;syntax&nbsp;traceback<br>
will&nbsp;be&nbsp;printed&nbsp;by&nbsp;calling&nbsp;the&nbsp;<a href="#PyCoolConsole-showsyntaxerror">showsyntaxerror</a>()&nbsp;method.<br>
&nbsp;<br>
2)&nbsp;The&nbsp;input&nbsp;is&nbsp;incomplete,&nbsp;and&nbsp;more&nbsp;input&nbsp;is&nbsp;required;<br>
compile_command()&nbsp;returned&nbsp;None.&nbsp;&nbsp;Nothing&nbsp;happens.<br>
&nbsp;<br>
3)&nbsp;The&nbsp;input&nbsp;is&nbsp;complete;&nbsp;compile_command()&nbsp;returned&nbsp;a&nbsp;code<br>
object.&nbsp;&nbsp;The&nbsp;code&nbsp;is&nbsp;executed&nbsp;by&nbsp;calling&nbsp;<a href="#PyCoolConsole-runcode">runcode</a>()&nbsp;(which<br>
also&nbsp;handles&nbsp;run-time&nbsp;exceptions,&nbsp;except&nbsp;for&nbsp;SystemExit).<br>
&nbsp;<br>
The&nbsp;return&nbsp;value&nbsp;is&nbsp;True&nbsp;in&nbsp;case&nbsp;2,&nbsp;False&nbsp;in&nbsp;the&nbsp;other&nbsp;cases&nbsp;(unless<br>
an&nbsp;exception&nbsp;is&nbsp;raised).&nbsp;&nbsp;The&nbsp;return&nbsp;value&nbsp;can&nbsp;be&nbsp;used&nbsp;to<br>
decide&nbsp;whether&nbsp;to&nbsp;use&nbsp;sys.ps1&nbsp;or&nbsp;sys.ps2&nbsp;to&nbsp;prompt&nbsp;the&nbsp;next<br>
line.</tt></dd></dl>
<dl><dt><a name="PyCoolConsole-showsyntaxerror"><strong>showsyntaxerror</strong></a>(self, filename<font color="#909090">=None</font>)</dt><dd><tt>Display&nbsp;the&nbsp;syntax&nbsp;error&nbsp;that&nbsp;just&nbsp;occurred.<br>
&nbsp;<br>
This&nbsp;doesn't&nbsp;display&nbsp;a&nbsp;stack&nbsp;trace&nbsp;because&nbsp;there&nbsp;isn't&nbsp;one.<br>
&nbsp;<br>
If&nbsp;a&nbsp;filename&nbsp;is&nbsp;given,&nbsp;it&nbsp;is&nbsp;stuffed&nbsp;in&nbsp;the&nbsp;exception&nbsp;instead<br>
of&nbsp;what&nbsp;was&nbsp;there&nbsp;before&nbsp;(because&nbsp;Python's&nbsp;parser&nbsp;always&nbsp;uses<br>
"&lt;string&gt;"&nbsp;when&nbsp;reading&nbsp;from&nbsp;a&nbsp;string).<br>
&nbsp;<br>
The&nbsp;output&nbsp;is&nbsp;written&nbsp;by&nbsp;<a href="#PyCoolConsole-write">write</a>(),&nbsp;below.</tt></dd></dl>
<dl><dt><a name="PyCoolConsole-showtraceback"><strong>showtraceback</strong></a>(self)</dt><dd><tt>Display&nbsp;the&nbsp;exception&nbsp;that&nbsp;just&nbsp;occurred.<br>
&nbsp;<br>
We&nbsp;remove&nbsp;the&nbsp;first&nbsp;stack&nbsp;item&nbsp;because&nbsp;it&nbsp;is&nbsp;our&nbsp;own&nbsp;code.<br>
&nbsp;<br>
The&nbsp;output&nbsp;is&nbsp;written&nbsp;by&nbsp;<a href="#PyCoolConsole-write">write</a>(),&nbsp;below.</tt></dd></dl>
<dl><dt><a name="PyCoolConsole-write"><strong>write</strong></a>(self, data)</dt><dd><tt>Write&nbsp;a&nbsp;string.<br>
&nbsp;<br>
The&nbsp;base&nbsp;implementation&nbsp;writes&nbsp;to&nbsp;sys.stderr;&nbsp;a&nbsp;subclass&nbsp;may<br>
replace&nbsp;this&nbsp;with&nbsp;a&nbsp;different&nbsp;implementation.</tt></dd></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>format</strong> = '%(levelname)s:%(name)s: %(message)s'<br>
<strong>handler</strong> = &lt;logging.StreamHandler instance&gt;<br>
<strong>historyFile</strong> = '.coolconsole_hist'<br>
<strong>log</strong> = &lt;logging.Logger instance&gt;</td></tr></table>
</body></html>
\ No newline at end of file
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module PyCoolCopy</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>PyCoolCopy</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolCopy.py">/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolCopy.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="PyCoolTool.html">PyCoolTool</a><br>
</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="PyCoolCopy.html#PyCoolCopy">PyCoolCopy</a>
</font></dt><dt><font face="helvetica, arial"><a href="PyCoolCopy.html#Selection">Selection</a>
</font></dt><dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="PyCoolCopy.html#CopyError">CopyError</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="CopyError">class <strong>CopyError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Generic&nbsp;copy&nbsp;error&nbsp;class.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="CopyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
<dl><dt><a name="CopyError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
<dl><dt><a name="CopyError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PyCoolCopy">class <strong>PyCoolCopy</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PyCoolCopy-__init__"><strong>__init__</strong></a>(self, source)</dt><dd><tt>Initialize&nbsp;the&nbsp;object&nbsp;to&nbsp;a&nbsp;given&nbsp;database.<br>
&nbsp;<br>
If&nbsp;'source'&nbsp;is&nbsp;of&nbsp;type&nbsp;string,&nbsp;it&nbsp;must&nbsp;be&nbsp;a&nbsp;RAL&nbsp;compliant&nbsp;connect<br>
string&nbsp;or&nbsp;an&nbsp;sqlite&nbsp;filename&nbsp;following&nbsp;the&nbsp;requirements&nbsp;described<br>
in&nbsp;CoolTool.connect.<br>
&nbsp;<br>
Otherwise&nbsp;it&nbsp;must&nbsp;be&nbsp;a&nbsp;valid&nbsp;cool.IDatabase&nbsp;object.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;printable&nbsp;representation&nbsp;of&nbsp;a&nbsp;<a href="#PyCoolCopy">PyCoolCopy</a>&nbsp;object.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-append"><strong>append</strong></a>(self, target, selections)</dt><dd><tt>Copies&nbsp;the&nbsp;list&nbsp;of&nbsp;selection&nbsp;object&nbsp;to&nbsp;the&nbsp;HEAD&nbsp;of&nbsp;the&nbsp;target&nbsp;database.&nbsp;The<br>
target&nbsp;database&nbsp;may&nbsp;already&nbsp;exist.<br>
Each&nbsp;selection&nbsp;object&nbsp;can&nbsp;contain&nbsp;only&nbsp;one&nbsp;tag,&nbsp;but&nbsp;not&nbsp;necessarily&nbsp;the&nbsp;HEAD.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-copy"><strong>copy</strong></a>(self, target, selections)</dt><dd><tt>Copies&nbsp;the&nbsp;specified&nbsp;selections&nbsp;from&nbsp;the&nbsp;database&nbsp;associated&nbsp;with&nbsp;this<br>
object&nbsp;to&nbsp;the&nbsp;given&nbsp;target&nbsp;database.<br>
&nbsp;<br>
'target'&nbsp;is&nbsp;a&nbsp;RAL&nbsp;compatible&nbsp;connection&nbsp;string&nbsp;or&nbsp;a&nbsp;cool.IDatabase<br>
object.&nbsp;In&nbsp;case&nbsp;of&nbsp;a&nbsp;connection&nbsp;string,&nbsp;the&nbsp;target&nbsp;database&nbsp;must&nbsp;not<br>
exists&nbsp;--&nbsp;copy&nbsp;will&nbsp;attempt&nbsp;to&nbsp;create&nbsp;it&nbsp;and&nbsp;fail&nbsp;if&nbsp;it&nbsp;exists.&nbsp;In&nbsp;case<br>
of&nbsp;a&nbsp;cool.IDatabase&nbsp;object,&nbsp;the&nbsp;target&nbsp;database&nbsp;must&nbsp;not&nbsp;contain&nbsp;any<br>
data.&nbsp;(A&nbsp;check&nbsp;is&nbsp;made&nbsp;if&nbsp;any&nbsp;nodes&nbsp;other&nbsp;than&nbsp;'/'&nbsp;exist&nbsp;on&nbsp;the&nbsp;target<br>
database.)<br>
&nbsp;<br>
'selections'&nbsp;is&nbsp;list&nbsp;of&nbsp;<a href="#Selection">Selection</a>&nbsp;objects&nbsp;or&nbsp;a&nbsp;single&nbsp;seelction&nbsp;object.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-copyFolder"><strong>copyFolder</strong></a>(self, targetDb, selection, copy_tags<font color="#909090">=True</font>)</dt><dd><tt>Copies&nbsp;the&nbsp;specified&nbsp;selection&nbsp;to&nbsp;the&nbsp;target&nbsp;database,&nbsp;assuming<br>
selection.nodeName&nbsp;to&nbsp;be&nbsp;a&nbsp;folder.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-copyFolderSet"><strong>copyFolderSet</strong></a>(self, targetDb, selection, recursive<font color="#909090">=True</font>, copy_tags<font color="#909090">=True</font>)</dt><dd><tt>Copies&nbsp;the&nbsp;specified&nbsp;selection&nbsp;to&nbsp;the&nbsp;target&nbsp;database,&nbsp;assuming<br>
selection.nodeName&nbsp;to&nbsp;be&nbsp;a&nbsp;folder&nbsp;set.&nbsp;This&nbsp;method&nbsp;will&nbsp;copy<br>
encountered&nbsp;nested&nbsp;foldersets&nbsp;recursively.</tt></dd></dl>
<dl><dt><a name="PyCoolCopy-copyParentFolderSets"><strong>copyParentFolderSets</strong></a>(self, targetDb, nodeName)</dt></dl>
<dl><dt><a name="PyCoolCopy-restoreTagRelation"><strong>restoreTagRelation</strong></a>(self, target, nodePath, ancestorTag, nodeTag)</dt><dd><tt>Recursively&nbsp;copy&nbsp;the&nbsp;tag&nbsp;relation&nbsp;from&nbsp;the&nbsp;ancestor&nbsp;tag&nbsp;to&nbsp;the&nbsp;folder&nbsp;tag.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Selection">class <strong>Selection</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;<a href="#Selection">Selection</a>&nbsp;class&nbsp;groups&nbsp;all&nbsp;selection&nbsp;criteria&nbsp;which&nbsp;define&nbsp;the&nbsp;scope<br>
of&nbsp;a&nbsp;copy.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Selection-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt><dd><tt>Compare&nbsp;<a href="#Selection">Selection</a>&nbsp;objects&nbsp;via&nbsp;their&nbsp;nodeName.</tt></dd></dl>
<dl><dt><a name="Selection-__init__"><strong>__init__</strong></a>(self, nodeName<font color="#909090">='/'</font>, since<font color="#909090">=0L</font>, until<font color="#909090">=9223372036854775807L</font>, channels<font color="#909090">=&lt;ROOT.cool::ChannelSelection object&gt;</font>, tags<font color="#909090">=[]</font>)</dt><dd><tt>Creates&nbsp;a&nbsp;<a href="#Selection">Selection</a>&nbsp;object&nbsp;with&nbsp;the&nbsp;following&nbsp;fields:<br>
&nbsp;&nbsp;&nbsp;&nbsp;nodeName&nbsp;:&nbsp;name&nbsp;of&nbsp;a&nbsp;folder&nbsp;or&nbsp;folderset<br>
&nbsp;&nbsp;&nbsp;&nbsp;since&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;beginning&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey<br>
&nbsp;&nbsp;&nbsp;&nbsp;until&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;end&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey.&nbsp;NB:&nbsp;the&nbsp;end&nbsp;point<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;*included*&nbsp;in&nbsp;selections<br>
&nbsp;&nbsp;&nbsp;&nbsp;channels&nbsp;:&nbsp;a&nbsp;channel&nbsp;range&nbsp;as&nbsp;specified&nbsp;through<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cool.ChannelSelection<br>
&nbsp;&nbsp;&nbsp;&nbsp;tags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;a&nbsp;list&nbsp;of&nbsp;tags&nbsp;(an&nbsp;empty&nbsp;list&nbsp;means&nbsp;the&nbsp;HEAD&nbsp;is&nbsp;selected)</tt></dd></dl>
<dl><dt><a name="Selection-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;printable&nbsp;representation&nbsp;of&nbsp;a&nbsp;<a href="#Selection">Selection</a>&nbsp;object.</tt></dd></dl>
<dl><dt><a name="Selection-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;printable&nbsp;representation&nbsp;of&nbsp;a&nbsp;<a href="#Selection">Selection</a>&nbsp;object.</tt></dd></dl>
<dl><dt><a name="Selection-extendChannels"><strong>extendChannels</strong></a>(self, channels)</dt><dd><tt>Extends&nbsp;the&nbsp;selection's&nbsp;channel&nbsp;range&nbsp;to&nbsp;the&nbsp;given&nbsp;channels.&nbsp;The&nbsp;channel<br>
range&nbsp;is&nbsp;only&nbsp;changed&nbsp;if&nbsp;an&nbsp;end&nbsp;point&nbsp;lies&nbsp;outside&nbsp;the&nbsp;current&nbsp;range.</tt></dd></dl>
<dl><dt><a name="Selection-extendIov"><strong>extendIov</strong></a>(self, since, until)</dt><dd><tt>Extends&nbsp;the&nbsp;selection's&nbsp;IOV&nbsp;range&nbsp;to&nbsp;the&nbsp;given&nbsp;since,&nbsp;until.&nbsp;The&nbsp;IOV<br>
range&nbsp;is&nbsp;only&nbsp;changed&nbsp;if&nbsp;an&nbsp;end&nbsp;point&nbsp;lies&nbsp;outside&nbsp;the&nbsp;current&nbsp;range.</tt></dd></dl>
<dl><dt><a name="Selection-extendTagList"><strong>extendTagList</strong></a>(self, tagList)</dt><dd><tt>Extends&nbsp;the&nbsp;selection's&nbsp;tag&nbsp;list.&nbsp;This&nbsp;prevent&nbsp;some&nbsp;data&nbsp;loss&nbsp;and<br>
breaks&nbsp;in&nbsp;relations&nbsp;between&nbsp;tags.</tt></dd></dl>
<dl><dt><a name="Selection-hasHeadTag"><strong>hasHeadTag</strong></a>(self)</dt></dl>
<dl><dt><a name="Selection-hasNonHeadTags"><strong>hasNonHeadTags</strong></a>(self)</dt></dl>
<dl><dt><a name="Selection-isParent"><strong>isParent</strong></a>(self, nodeName)</dt><dd><tt>Tests&nbsp;is&nbsp;the&nbsp;given&nbsp;nodeName&nbsp;is&nbsp;a&nbsp;parent&nbsp;folderset&nbsp;of&nbsp;the&nbsp;selection's&nbsp;nodeName.</tt></dd></dl>
<dl><dt><a name="Selection-sortTags"><strong>sortTags</strong></a>(self)</dt><dd><tt>Makes&nbsp;sure&nbsp;the&nbsp;given&nbsp;tag&nbsp;list&nbsp;contains&nbsp;only&nbsp;one&nbsp;'HEAD'&nbsp;tag&nbsp;and&nbsp;that<br>
it&nbsp;is&nbsp;at&nbsp;the&nbsp;end.</tt></dd></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-append"><strong>append</strong></a>(sourceDb, targetDb, nodeName<font color="#909090">='/'</font>, since<font color="#909090">=0L</font>, until<font color="#909090">=9223372036854775807L</font>, channels<font color="#909090">=&lt;ROOT.cool::ChannelSelection object&gt;</font>, tag<font color="#909090">=''</font>)</dt><dd><tt>Appends&nbsp;the&nbsp;specified&nbsp;selection&nbsp;from&nbsp;the&nbsp;given&nbsp;source&nbsp;to&nbsp;the&nbsp;target&nbsp;database.<br>
&nbsp;<br>
'sourceDb'&nbsp;and&nbsp;'targetDb'&nbsp;are&nbsp;RAL&nbsp;compatible&nbsp;connection&nbsp;strings&nbsp;or<br>
cool.IDatabase&nbsp;objects.<br>
&nbsp;<br>
The&nbsp;selection&nbsp;is&nbsp;specified&nbsp;through&nbsp;the&nbsp;following&nbsp;arguments:<br>
&nbsp;&nbsp;&nbsp;&nbsp;nodeName&nbsp;:&nbsp;name&nbsp;of&nbsp;a&nbsp;folder&nbsp;or&nbsp;folderset<br>
&nbsp;&nbsp;&nbsp;&nbsp;since&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;beginning&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey<br>
&nbsp;&nbsp;&nbsp;&nbsp;until&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;end&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey.&nbsp;NB:&nbsp;the&nbsp;end&nbsp;point&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*included*&nbsp;in&nbsp;selections<br>
&nbsp;&nbsp;&nbsp;&nbsp;channels&nbsp;:&nbsp;a&nbsp;channel&nbsp;range&nbsp;as&nbsp;specified&nbsp;through&nbsp;cool.ChannelSelection<br>
&nbsp;&nbsp;&nbsp;&nbsp;tag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;a&nbsp;tag&nbsp;name</tt></dd></dl>
<dl><dt><a name="-copy"><strong>copy</strong></a>(sourceDb, targetDb, nodeName<font color="#909090">='/'</font>, since<font color="#909090">=0L</font>, until<font color="#909090">=9223372036854775807L</font>, channels<font color="#909090">=&lt;ROOT.cool::ChannelSelection object&gt;</font>, tags<font color="#909090">=[]</font>)</dt><dd><tt>Copies&nbsp;the&nbsp;specified&nbsp;selection&nbsp;from&nbsp;the&nbsp;given&nbsp;source&nbsp;to&nbsp;the&nbsp;target&nbsp;database.<br>
&nbsp;<br>
'sourceDb'&nbsp;and&nbsp;'targetDb'&nbsp;are&nbsp;RAL&nbsp;compatible&nbsp;connection&nbsp;strings&nbsp;or<br>
cool.IDatabase&nbsp;objects.<br>
&nbsp;<br>
If&nbsp;'targetDb'&nbsp;is&nbsp;a&nbsp;connection&nbsp;string,&nbsp;the&nbsp;database&nbsp;must&nbsp;not&nbsp;exists<br>
--&nbsp;'copy'&nbsp;will&nbsp;attempt&nbsp;to&nbsp;create&nbsp;it&nbsp;and&nbsp;fail&nbsp;if&nbsp;it&nbsp;exists.&nbsp;In&nbsp;case<br>
'targetDb'&nbsp;is&nbsp;a&nbsp;cool.IDatabase&nbsp;object,&nbsp;database&nbsp;must&nbsp;not&nbsp;contain&nbsp;any<br>
data.&nbsp;(A&nbsp;check&nbsp;is&nbsp;made&nbsp;if&nbsp;any&nbsp;nodes&nbsp;other&nbsp;than&nbsp;'/'&nbsp;exist&nbsp;on&nbsp;the&nbsp;target<br>
database.)<br>
&nbsp;<br>
The&nbsp;selection&nbsp;is&nbsp;specified&nbsp;through&nbsp;the&nbsp;following&nbsp;arguments:<br>
&nbsp;&nbsp;&nbsp;&nbsp;nodeName&nbsp;:&nbsp;name&nbsp;of&nbsp;a&nbsp;folder&nbsp;or&nbsp;folderset<br>
&nbsp;&nbsp;&nbsp;&nbsp;since&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;beginning&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey<br>
&nbsp;&nbsp;&nbsp;&nbsp;until&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;end&nbsp;of&nbsp;IOV,&nbsp;long&nbsp;or&nbsp;cool.ValidiyKey.&nbsp;NB:&nbsp;the&nbsp;end&nbsp;point&nbsp;is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*included*&nbsp;in&nbsp;selections<br>
&nbsp;&nbsp;&nbsp;&nbsp;channels&nbsp;:&nbsp;a&nbsp;channel&nbsp;range&nbsp;as&nbsp;specified&nbsp;through&nbsp;cool.ChannelSelection<br>
&nbsp;&nbsp;&nbsp;&nbsp;tag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;a&nbsp;tag&nbsp;name</tt></dd></dl>
<dl><dt><a name="-dbExists"><strong>dbExists</strong></a>(connectString)</dt><dd><tt>Tests&nbsp;if&nbsp;a&nbsp;database&nbsp;exists&nbsp;(can&nbsp;be&nbsp;opened)&nbsp;for&nbsp;the&nbsp;given&nbsp;connect&nbsp;string.</tt></dd></dl>
<dl><dt><a name="-debug"><strong>debug</strong></a>()</dt><dd><tt>Set&nbsp;the&nbsp;module's&nbsp;logging&nbsp;level&nbsp;to&nbsp;debug.</tt></dd></dl>
<dl><dt><a name="-isEmpty"><strong>isEmpty</strong></a>(db)</dt><dd><tt>Tests&nbsp;if&nbsp;the&nbsp;given&nbsp;database&nbsp;is&nbsp;empty:&nbsp;Any&nbsp;folder(set)&nbsp;besides&nbsp;the<br>
root&nbsp;folderset&nbsp;'/'&nbsp;is&nbsp;an&nbsp;indication&nbsp;the&nbsp;given&nbsp;database&nbsp;is&nbsp;not&nbsp;empty.</tt></dd></dl>
<dl><dt><a name="-isHeadTag"><strong>isHeadTag</strong></a>(tag)</dt><dd><tt>Checks&nbsp;if&nbsp;the&nbsp;given&nbsp;tag&nbsp;is&nbsp;the&nbsp;HEAD&nbsp;tag&nbsp;(or&nbsp;a&nbsp;synonym&nbsp;for&nbsp;it).</tt></dd></dl>
<dl><dt><a name="-silent"><strong>silent</strong></a>()</dt><dd><tt>Silence&nbsp;the&nbsp;module's&nbsp;logging&nbsp;(e.g.&nbsp;for&nbsp;unit&nbsp;tests&nbsp;or&nbsp;batch&nbsp;processing).</tt></dd></dl>
<dl><dt><a name="-validateSelections"><strong>validateSelections</strong></a>(selections)</dt><dd><tt>Validates&nbsp;a&nbsp;list&nbsp;of&nbsp;selections&nbsp;for&nbsp;copying&nbsp;and&nbsp;returns&nbsp;a&nbsp;validated&nbsp;list&nbsp;for<br>
subsequent&nbsp;copying.&nbsp;The&nbsp;list&nbsp;modified&nbsp;in&nbsp;place,&nbsp;therefore&nbsp;it&nbsp;is&nbsp;not&nbsp;returned.<br>
&nbsp;<br>
This&nbsp;list&nbsp;will&nbsp;be&nbsp;sorted&nbsp;such&nbsp;that&nbsp;deepest&nbsp;paths&nbsp;are&nbsp;copied&nbsp;first&nbsp;and&nbsp;IOV&nbsp;ranges<br>
of&nbsp;subfolders&nbsp;include&nbsp;selections&nbsp;of&nbsp;their&nbsp;parent&nbsp;folder&nbsp;sets.<br>
&nbsp;<br>
A&nbsp;<a href="#CopyError">CopyError</a>&nbsp;exception&nbsp;will&nbsp;be&nbsp;raised&nbsp;if&nbsp;the&nbsp;list&nbsp;cannot&nbsp;be&nbsp;validated.</tt></dd></dl>
<dl><dt><a name="-verbose"><strong>verbose</strong></a>()</dt><dd><tt>Set&nbsp;the&nbsp;module's&nbsp;logging&nbsp;level&nbsp;to&nbsp;verbose.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>format</strong> = '%(levelname)s:%(name)s: %(message)s'<br>
<strong>handler</strong> = &lt;logging.StreamHandler instance&gt;<br>
<strong>log</strong> = &lt;logging.Logger instance&gt;</td></tr></table>
</body></html>
\ No newline at end of file
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module PyCoolDiff</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>PyCoolDiff</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolDiff.py">/afs/cern.ch/sw/lcg/app/releases/COOL/internal/marcocle/COOL_HEAD/slc4_ia32_gcc34_dbg/python/PyCoolDiff.py</a></font></td></tr></table>
<p><tt>#&nbsp;$&nbsp;Id:&nbsp;$</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="exceptions.html#RuntimeError">exceptions.RuntimeError</a>(<a href="exceptions.html#StandardError">exceptions.StandardError</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="PyCoolDiff.html#CondDBDiffError">CondDBDiffError</a>
</font></dt></dl>
</dd>
</dl>
<p>