El dv 21 de 08 del 2009 a les 16:58 -0400, en/na DEMOLISHOR! the
Demolishor va escriure:
> Hello folks,
> I've been happily using PyTables for a month or two now, but I've
> run into a pretty weird problem. I have attached a PyTables file that
> has a table with a single row of data from an analysis I am doing. I
> run this script:
>
>
> #!/usr/bin/env python
>
> import sys
>
> import tables
>
> fp = tables.openFile('ev697158.h5', mode='r')
>
> print "nrow = ", len(fp.root.nt)
> print "t = ", fp.root.nt[0]['t']
>
> cut1 = '1 and (t > -0.4) and (sin(pip1_theta) < 0.5) and
> (sin(pip2_theta) < 0.5)'
> cut2 = '1 and (t > -0.4)'
You are using the 'and' operator and this cannot be overloaded in Python
(at least Python 2.x series). Use the '&' operator instead. Please,
refer to the condition syntax appendix of PyTables User's Guide:
http://www.pytables.org/docs/manual/apb.html
and be sure you understand it before to proceed further with cut
expressions.
HTH,
Francesc
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users