Sfepy developers,
I wanted to introduce myself and first of all say thank you for the hard work you have put into sfepy. The breadth of this little program is somewhat astounding and I really think it is going to be a boon to me in my research in biomechanics.
I have been looking through the code of sfepy, and I had a comment about base/base.py:
I notice that your problem definition files are loaded with import/ reload. I do something similar in my project (http://code.google.com/p/ seedwater/, https://github.com/davidmashburn/SeedWaterSegmenter) and recently switched to using the "imp" module and the load_module function: """ import imp ... fid=open(seedPointsFile,'U') Seeds = imp.load_module('Seeds',fid,'Seeds.py',('.py','U',1)) fid.close() """
If I remember right, it not only avoided messing with sys.path, but actually executed significantly faster in some circumstances. You may already know about this and/or have a reason not to use it, but I thought I would share my experiences.
Thanks again and look forward to using more of this great project! -David
Hi David,
On 02/29/2012 05:52 PM, David Mashburn wrote:
Sfepy developers,
I wanted to introduce myself and first of all say thank you for the hard work you have put into sfepy. The breadth of this little program is somewhat astounding and I really think it is going to be a boon to me in my research in biomechanics.
Thank you for such kind words!
I have been looking through the code of sfepy, and I had a comment about base/base.py:
I notice that your problem definition files are loaded with import/ reload. I do something similar in my project (http://code.google.com/p/ seedwater/, https://github.com/davidmashburn/SeedWaterSegmenter) and recently switched to using the "imp" module and the load_module function: """ import imp ... fid=open(seedPointsFile,'U') Seeds = imp.load_module('Seeds',fid,'Seeds.py',('.py','U',1)) fid.close() """
If I remember right, it not only avoided messing with sys.path, but actually executed significantly faster in some circumstances. You may already know about this and/or have a reason not to use it, but I thought I would share my experiences.
Good to know, I was not aware of this module. There is no special reason we do it the current way. I will check imp.
Thanks again and look forward to using more of this great project! -David
Great, thanks for your interest! r. PS: looking forward to seeing some images on your web site...
On 02/29/2012 11:19 AM, Robert Cimrman wrote:
Hi David,
On 02/29/2012 05:52 PM, David Mashburn wrote:
Sfepy developers,
I wanted to introduce myself and first of all say thank you for the hard work you have put into sfepy. The breadth of this little program is somewhat astounding and I really think it is going to be a boon to me in my research in biomechanics.
Thank you for such kind words!
I have been looking through the code of sfepy, and I had a comment about base/base.py:
I notice that your problem definition files are loaded with import/ reload. I do something similar in my project (http://code.google.com/p/ seedwater/, https://github.com/davidmashburn/SeedWaterSegmenter) and recently switched to using the "imp" module and the load_module function: """ import imp ... fid=open(seedPointsFile,'U') Seeds = imp.load_module('Seeds',fid,'Seeds.py',('.py','U',1)) fid.close() """
If I remember right, it not only avoided messing with sys.path, but actually executed significantly faster in some circumstances. You may already know about this and/or have a reason not to use it, but I thought I would share my experiences.
Good to know, I was not aware of this module. There is no special reason we do it the current way. I will check imp.
Thanks again and look forward to using more of this great project! -David
Great, thanks for your interest! r. PS: looking forward to seeing some images on your web site...
Funny you should mention that ;) You might want to check back now (I had been meaning to do this, thanks).
On 02/29/2012 07:28 PM, David Mashburn wrote:
On 02/29/2012 11:19 AM, Robert Cimrman wrote:
PS: looking forward to seeing some images on your web site...
Funny you should mention that ;) You might want to check back now (I had been meaning to do this, thanks).
Heh, nice! I have some colleagues who process microscope images (using stereological methods, commercial software), so I was interested in seeing what your software does. BTW. your Cpyx looks like a nice way to quickly use cython in a python code.
r.
On 02/29/2012 01:21 PM, Robert Cimrman wrote:
On 02/29/2012 07:28 PM, David Mashburn wrote:
On 02/29/2012 11:19 AM, Robert Cimrman wrote:
PS: looking forward to seeing some images on your web site...
Funny you should mention that ;) You might want to check back now (I had been meaning to do this, thanks).
Heh, nice! I have some colleagues who process microscope images (using stereological methods, commercial software), so I was interested in seeing what your software does. BTW. your Cpyx looks like a nice way to quickly use cython in a python code.
r.
I like to think so ;)
I have found it useful, especially coupled with a multi-line shell like PySlices (my other project).
On 02/29/2012 08:29 PM, David Mashburn wrote:
On 02/29/2012 01:21 PM, Robert Cimrman wrote:
On 02/29/2012 07:28 PM, David Mashburn wrote:
On 02/29/2012 11:19 AM, Robert Cimrman wrote:
PS: looking forward to seeing some images on your web site...
Funny you should mention that ;) You might want to check back now (I had been meaning to do this, thanks).
Heh, nice! I have some colleagues who process microscope images (using stereological methods, commercial software), so I was interested in seeing what your software does. BTW. your Cpyx looks like a nice way to quickly use cython in a python code.
I like to think so ;)
I have found it useful, especially coupled with a multi-line shell like PySlices (my other project).
It's great to have another experienced developer on board :) Feel free to ask any questions. Some parts of the code (especially in sfepy/base) are rather old and could use a keen eye.
r.
participants (2)
-
David Mashburn -
Robert Cimrman