Log of /trunk/bindings/pyroot/src/TPython.cxx
Parent Directory
Revision
22759 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 19 21:14:47 2008 UTC (6 years, 10 months ago) by
wlav
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 12962 byte(s)
Diff to
previous 21759
o) opt in ObjectProxy.h: skip creating of temporary TClassRef
o) TPython::Exec now returns kFALSE on failure
o) TPySelector now takes a python module, so that that file is
looked up through PYTHONPATH, and it searches for the
TPySelector derived class to instantiate and use
Revision
21759 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 17 16:51:32 2008 UTC (7 years ago) by
wlav
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 12901 byte(s)
Diff to
previous 20941
o) Minor header cleanup in RootWrapper.cxx and MethodHolder.cxx
o) Made abstract classes not-instantiatable by blocking __init__
o) Fix looping over empty STL(-like) containers
o) Give lower priority to Unknown& in favor of Unknown*
o) Bugfix: used a dead temporary in Utility.cxx
o) fix unary - and unary + (see e.g. TVector3)
o) Implemented __neg__ and __pos__ ( unary operator-() and operator+() )
o) Map operator bool() to __nonzero__
o) Fix class naming to allow SomeTemplate( std.vector( float ) ) to work
o) Make Utility::InstallMethod work for free functions
o) No longer rely on CINT internals in TF1 callbacks (still relying on
them for Minuit callbacks ... to be fixed)
Revision
16373 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Sep 28 19:59:12 2006 UTC (8 years, 3 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 10901 byte(s)
Diff to
previous 15460
From Wim Lavrijsen:
o) no convenience look-ups of std:: classes in ROOT:: (causes infinite loop
in gROOT->GetClass() otherwise)
o) set G__return before calling through CINT to prevent old error hysteresis
o) following TRint, removed loading of libs from TPyROOTApplication
o) fixed name lookup for new style classes when used from CINT
o) improved support for CINT-interpreted class constructors
o) don't follow smart pointers when printing object representation (unsafe)
o) allow "from ROOT import *" in multiple modules
o) fixed creation order TApplication <-> gROOT.SetBatch()
o) improved overload resolution for int/long/float/double based on priority
o) added bool to types that can be set globally through ROOT module
o) removed p2.5 warnings on MacOSX
o) use malloc instead of new[] in by value execution to match CINT's free
Revision
13268 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 17 06:26:35 2005 UTC (9 years, 2 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 8432 byte(s)
Diff to
previous 12690
From Wim Lavrijsen:
o) improved tp_repr for ObjectProxy objects
o) direct "data member style" access to top-level objects in TTree
o) remove DISPLAY envar in batch mode before loading ROOT
o) implemented late selection of STL templates
o) put application init seperate from ROOT init in ROOT.py
Revision
11864 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 25 06:23:36 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 7531 byte(s)
Diff to
previous 11741
From Wim Lavrijsen
o) "from ROOT import *" -> to "import ROOT" in TPython.cxx b/o performance
o) changed const ref and ref calls to not give up ownership
o) unify typedefs onto one single python class
o) refactored property types, CINT returns, and TGlobal conversions
o) count arguments from 1 instead of 0 in error messages
o) add AddressOf() operator (mainly for working with TTrees)
o) make GetRootGlobalFromString raise LookupError on failure
o) add lookup gROOT.FindObject() to module lookup, cf. CINT
o) support .L syntax for .so's
o) added range of array types for converters, executors, and properties
o) use buffer copy for arrays with sizes, buffer pointer copy otherwise
o) add lazy class lookup for namespaces / support for inner classes
o) make use of new CINT CallFunc interface
o) fix for char/uchar argument conversions (allow both string and int)
Revision
11741 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 6 10:08:53 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 7538 byte(s)
Diff to
previous 11682
From Wim Lavrijsen:
o) fix slot containg method name: __name_ -> __name__ in MethodProxy
o) print <class>::<class> rather than <class>::__init__ in ctor docstring
o) improved error reporting from overloaded functions
o) add class/type check for unbound methods
o) use handler to translate CINT errors into equivalent python exceptions
o) minor typographical fixes
o) add rudimentary support for CINT C++ macro's (NULL, EOF, etc.)
Revision
11682 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 28 07:33:55 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 7539 byte(s)
Diff to
previous 11225
From Wim Lavrijsen:
o) fix for array overloading when typecode is unknown
o) change name mangling __ -> _ for private data members
o) added prototype code for crossing python classes/objects into CINT,
for example:
$ cat Aap.py
print 'creating class Aap ... '
class Aap:
def __init__( self ):
print 'in Aap.__init__'
def gime( self, what ):
return what
$ root
root [0] TPython::LoadMacro( "Aap.py" );
creating class Aap ...
root [1] Aap a = Aap();
in Aap.__init__
root [2] const char* b = a.gime( "aap" );
root [3] b
(const char* 0x41fe1894)"aap"
root [4]
Revision
11225 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 4 07:44:11 2005 UTC (9 years, 10 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 6664 byte(s)
Diff to
previous 10607
From Wim Lavrijsen:
The core of PyROOT has been rewritten to:
1) reduce layers for performance,
2) refactor code (not completely done), and
3) follow the ROOT coding conventions
Along the way, a few loose ends have been wrapped up. Most notable of
these are: class static data, global builtin types, method doc strings,
mangled private member functions, and the addition of a C++ exception
to report python errors.
Revision
10607 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 23 21:45:06 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 6479 byte(s)
Diff to
previous 10433
From Wim Lavrijsen
o) added ROOT/CINT command .ls and .pwd
o) expend envars and user for .x
o) enable "from ROOT import *" in scripts
o) workaround for loading TTree::MakeClass() generated macro
-> "works," but still needs investigating
o) allow access to TObject*'s that are public data members
o) support for namespaces
o) add IsEqual/__eq__ for TObject pythonization
o) "from ROOT import*" when starting python from CINT
o) force cleanup for all objects that enter python
o) add default ctor if no ctors defined
o) use TObject* instead of void* in MemoryRegulator
o) refactorizations, more caches (speed), and minor fixes
Revision
10433 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 30 06:26:43 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 6472 byte(s)
Diff to
previous 9538
From Wim Lavrijsen
o) allow CINT-style commands .x, .! and .q
o) add gPad to __all__ in ROOT.py
o) simplify Pythonize.cxx through better use of Python C-API
o) add __cmp__ for TObject in Pythonize.cxx
o) allow '0' where a pointer is expected
o) class level enum support
o) global enum support (removed color enums from ROOT.py)
o) allow python functions without parameters for TF1
o) minimum python version set to 2.2 (was 2.1)
o) allow dynamic size checking in python buffers
o) fixed caching for TTree named access
o) follow ROOT conventions more closely in public .h files
o) return python int for int (instead of python long)
o) no longer treat gStyle, gRandom, etc. as special
Revision
9538 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jul 17 06:32:15 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 6469 byte(s)
Diff to
previous 9179
From Wim Lavrijsen:
still trying to get a handle on better interaction with CINT, but in the
mean time a few housekeeping changes (see attach):
o) TPython, TPyReturn: added comments in line w/ ROOT autodoc conventions
o) MethodHolder: assert -> ReferenceError when accessing NULL object
o) MethodHolder: fix for PyObject parameter passing
Revision
9179 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jun 12 05:35:10 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 4817 byte(s)
Diff to
previous 8714
From Wim Lavrijsen:
Files for new class TPyReturn:
inc/TPyReturn.h
src/TPyReturn.cxx
this is a carrier object that results from TPython::Eval() and allows
implicit conversion to builtin types:
root> double d = TPython::Eval( "1.5+math.pi")
root> d
(double)4.64159265358979312e+00
as well as the original API (but now an explicit cast is required as
CINT doesn't use the implicit one):
root> TBrowser* b = (TBrowser*) TPython::Eval( "ROOT.TBrowser()" )
root> b
(class TBrowser*)0x8d057b0
Files for new class PropertyHolder:
src/PropertyHolder.h
src/PropertyHolder.cxx
which is similar to MethodHolder, but holds on to public data types as
requested by Juan in the form of a python property. Not all conversions
are implemented, though, so not all types of data members can be accessed,
as I'm factoring the commonality out of PropertyHolder and MethodHolder.
Files for intercepting requests for Python classes:
src/TPyClassGenerator.h
src/TPyClassGenerator.cxx
which is only very rudimentary right now.
Changes to existing files:
o reduced number of loaded libs in ROOT.py
o set interval check in ROOT.py to follow python2.3
o generate dictionary for TPyReturn
o use TPyReturn for TPython::Eval
o use new style classes in RootWrapper
o collect public data members and enter in pyclass dict
o moved type scanning to Utility
Revision
8699 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Tue Apr 27 06:28:48 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/pyroot/src/TPython.cxx
File length: 3313 byte(s)
Introduce new package pyroot by Pere Mato & Wim Lawrijsen.
pyroot is a Python interface to any class having a CINT dictionary.
pyroot is an optional package. It can be selected at configure time with, eg
--enable-explicitlink \
--enable-python \
--with-python-incdir=/usr/local/include/python2.3 \
--with-python-libdir=/usr/local/lib/python2.3 \
enable-explicitlink is mandatory to build pyroot.
Note that python2.3 or above is required. You can download it from
http://www.python.org
The installation is currently certified only on Linux with gcc3.2.
python/ROOT tutorials are available in $ROOTSYS/tutorials/*.py.
To run the python tutorials, you can do
setenv PYTHONDIR $ROOTSYS/pyroot:$ROOTSYS/lib
cd $ROOTSYS/tutorials
python hsimple.py
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.