Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
_tfile.pyzdoc
Go to the documentation of this file.
1/**
2\class TFile
3\brief \parblock \endparblock
4\htmlonly
5<div class="pyrootbox">
6\endhtmlonly
7## PyROOT
8
9In the same way as for TDirectory, it is possible to inspect the content of a
10TFile object from Python as if the directories and objects it contains were its
11attributes. For more information, please refer to the TDirectory documentation.
12
13In addition, TFile instances can be inspected via the `Get` method, a feature
14that is inherited from TDirectoryFile (please see the documentation of
15TDirectoryFile for examples on how to use it).
16
17In order to write objects into a TFile, the `WriteObject` Python method can
18be used (more information in the documentation of TDirectoryFile).
19
20Finally, PyROOT modifies the TFile constructor and the TFile::Open
21method to make them behave in a more pythonic way. In particular,
22they both throw an `OSError` if there was a problem accessing the
23file (e.g. non-existent or corrupted file).
24\htmlonly
25</div>
26\endhtmlonly
27*/