[root] / trunk / bindings / pyroot / src / TPython.cxx Repository:
ViewVC logotype

Log of /trunk/bindings/pyroot/src/TPython.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 48879 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 15 12:44:33 2013 UTC (22 months, 1 week ago) by wlav
File length: 14685 byte(s)
Diff to previous 48494
allow checking MethodProxy type from TPython;
  for: http://root.cern.ch/phpBB3/viewtopic.php?f=14&t=15805

Revision 48494 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 7 00:04:52 2013 UTC (23 months, 2 weeks ago) by wlav
File length: 13905 byte(s)
Diff to previous 47464
port relocalized GIL release from v5-34-00-patches

Revision 47464 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 20 01:57:53 2012 UTC (2 years, 2 months ago) by wlav
File length: 13662 byte(s)
Diff to previous 39103
removal of Cint code by commenting it out (root/meta is currently in no shape for testing ... )

Revision 39103 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 4 21:01:29 2011 UTC (3 years, 8 months ago) by wlav
File length: 13613 byte(s)
Diff to previous 38562
fix comment

Revision 38562 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 22 22:12:45 2011 UTC (3 years, 10 months ago) by wlav
File length: 13602 byte(s)
Diff to previous 35499
fix for https://savannah.cern.ch/bugs/?79685

Revision 35499 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 23:04:28 2010 UTC (4 years, 4 months ago) by wlav
File length: 13511 byte(s)
Diff to previous 33571
intial, somewhat functional, python3 support

Revision 33571 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 18 18:31:51 2010 UTC (4 years, 8 months ago) by wlav
File length: 13281 byte(s)
Diff to previous 32409
clean up usage of TPyReturn

Revision 32409 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 25 17:44:16 2010 UTC (4 years, 10 months ago) by wlav
File length: 13283 byte(s)
Diff to previous 32397
do not create pseudo-classes for select builtin types

Revision 32397 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 24 13:43:12 2010 UTC (4 years, 10 months ago) by wlav
File length: 13157 byte(s)
Diff to previous 31614
 o) fix ref-count
 o) correct spelling mistakes in comments

Revision 31614 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 8 07:05:19 2009 UTC (5 years, 1 month ago) by brun
File length: 13156 byte(s)
Diff to previous 26147
Fix wrong use of "delete" instead of "delete []" (coverity)

Revision 26147 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 11 19:10:45 2008 UTC (6 years, 2 months ago) by wlav
File length: 13153 byte(s)
Diff to previous 26105
fix compiler warnings

Revision 26105 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 7 14:52:36 2008 UTC (6 years, 2 months ago) by wlav
File length: 13131 byte(s)
Diff to previous 26098
collect and cache common strings

Revision 26098 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 7 10:14:48 2008 UTC (6 years, 2 months ago) by wlav
File length: 13408 byte(s)
Diff to previous 25865
fixes for python calllback

Revision 25865 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 17 22:40:57 2008 UTC (6 years, 3 months ago) by wlav
File length: 13167 byte(s)
Diff to previous 23734
allow pickling of TBufferFile objects

Revision 23734 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 20:47:59 2008 UTC (6 years, 8 months ago) by wlav
File length: 13083 byte(s)
Diff to previous 23135
fix index bug

Revision 23135 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 11 08:16:55 2008 UTC (6 years, 9 months ago) by rdm
File length: 12962 byte(s)
Diff to previous 22759
move the following directories to "bindings":

ruby, pyroot

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 20941 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 21 00:59:03 2007 UTC (7 years, 2 months ago) by wlav
Original Path: trunk/pyroot/src/TPython.cxx
File length: 12855 byte(s)
Diff to previous 20882
extension of programmer access to PyROOT

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10843 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10843 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10893 byte(s)
Diff to previous 17575
remove :$ from tag line

Revision 17575 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 30 10:14:03 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10903 byte(s)
Diff to previous 16373
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

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 15460 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 16 18:18:04 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10307 byte(s)
Diff to previous 15423
From Wim:
 o) add const_cast for PyRun_FileEx to be compatible with python2.2

Revision 15423 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 13:52:01 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10238 byte(s)
Diff to previous 15422
Add a few more comments in TPython::ExecScript with an example to call it.

Revision 15422 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 13:46:30 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 10093 byte(s)
Diff to previous 13268
From Wim:
Add a new function
void TPython::ExecScript( const char* name, int argc, const char** argv )
{
// Execute a python stand-alone script, with argv CLI arguments.

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 12690 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 9 05:19:10 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 8183 byte(s)
Diff to previous 12193
From Wim Lavrijsen:
Fix many coding conventions violations.
Remaining violations should be teated as special cases in the rule checker.

Revision 12193 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 25 04:25:46 2005 UTC (9 years, 7 months ago) by brun
Original Path: trunk/pyroot/src/TPython.cxx
File length: 8179 byte(s)
Diff to previous 11864
From Wim Lavrijsen:
 o) updated TPyReturn and TPython comments for doc generator

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 8714 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 27 14:44:02 2004 UTC (10 years, 8 months ago) by rdm
Original Path: trunk/pyroot/src/TPython.cxx
File length: 3788 byte(s)
Diff to previous 8699
from Pere:
fixes in the configure script, Makefile and make Module.mk for the
PyROOT module.

Also class TPython now adheres to ROOT naming conventions.

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.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9