Hello Matt,
I think that doing something like that would be quite reasonable, it would probably be a bit easier to follow which functions that need a larch interpreter. I don't know if it makes sense to think about the interpreter as a class and the functions that use
interpreter as methods of that class, I'm not a very advanced python user and that is probably how I would think about it if it was written like that.
Johan
From: ifeffit-bounces@millenia.cars.aps.anl.gov [ifeffit-bounces@millenia.cars.aps.anl.gov] on behalf of Matt Newville [newville@cars.uchicago.edu]
Sent: 02 October 2015 16:47
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] Problems importing larch plugins to python
Hi Johan, Bruce,
Thanks. And, yes lots of the functions need a working interpreter passed in. I'm not sure how I would do it, but it might be reasonable, and more pythonic to do
session = larch.Interpreter()
session.FeffPathGroup(..)
session.feffit()
and so on. You'd still be typing *something* a lot, but it might be easier to follow.