[PyFeyn] pyFeyn

Andy Buckley andy.buckley at ed.ac.uk
Mon Jun 7 21:14:27 BST 2010


On 29/05/10 10:41, Helber Dussan wrote:
> Hello Dr. Andy Buckley,
> I have installed pyfeyn-0.3.1 in a mac os X 10.6,
> got PyX 0.10 and Python 2.6.5,
> and am sure PyX is working properly.
> But something is apparently wrong with pyfeyn, I am just learning python,
> I do not know what to change to make the pyfeyn to work.
> For example when I run:
> 
>>python feynml-test1.py
> 
> I get this:
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyx/text.py:888:
> DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
>   self.texinput, self.texoutput = os.popen4("%s%s %s" % (self.mode,
> ipcflag, self.texfilename), "t", 0)
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyx/dvifile.py:396:
> UserWarning: Ignoring line 5782 in mapping file
> '/usr/local/texlive/2009/texmf-var/fonts/map/dvips/updmap/psfonts.map':
> Unknown token '<'
>   warnings.warn("Ignoring line %i in mapping file '%s': %s" % (lineno,
> mappath, e))
> Which could be okay, sometimes it shows the same thing when using  PyX,
> but it generates a pdf image anyway.
> But after, this is what follows :
> Traceback (most recent call last):
>   File "feynml-test1.py", line 1, in <module>
>     from pyfeyn.user import *
>   File "build/bdist.macosx-10.3-fat/egg/pyfeyn/user.py", line 5, in <module>
>     the PYTHONSTARTUP environment variable if it exists).
>   File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyfeyn-0.3.1-py2.6.egg/pyfeyn/lines.py",
> line 188
>     as, bs = circle.intersect(line)
>      ^
> SyntaxError: invalid syntax

Hi Helber,

Sorry it's taken a while to reply: I've not actively done anything with
PyFeyn for some time! However, this problem has been fixed in the trunk
version by Georg: can you try checking this out:

svn co http://svn.hepforge.org/pyfeyn/trunk pyfeyn-trunk
cd pyfeyn-trunk
python setup.py [add usual arguments]

Hopefully this will work for you. I'm not sure if the subprocess/popen
warning will still appear -- this is a little awkward to make work
seamlessly between Python 2.6 and earlier versions which are still
active in particle physics deployments, but we should make it behave
neatly and get a new release out to officially address this "as" syntax
problem.

Best wishes,
Andy

-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh


More information about the PyFeyn mailing list