On Thu, Jun 19, 2014 at 12:22:42AM -0700, YTC wrote:
> I did export it. This is confirmed with os.environ['GWYDDION_LIBDIR'] in
> python shell.
> With this, gwy.gwy_find_self_dir('modules') still returns that previous path

Ah, I see now.  There is a special self-finding code for Apple systems
that locates the library directory in the main bundle

https://sourceforge.net/p/gwyddion/code/HEAD/tree/trunk/gwyddion/libgwyddion/gwyutils.c#l559

Which is the core of the problem.  When you run Gwyddion the main bundle
is Gwyddion and you get the Gwyddion directory.  But when you run Python
the main bundle is Python and you get the Python directory instead.  I
will give the environment variables the highest priority on all systems;
this is how they should work anyway.

It should be also possible to fix this by passing the Gwyddion bundle to
CFBundleCopyResourcesDirectoryURL() and CFBundleCopyBundleURL() instead
of whatever we get from CFBundleGetMainBundle().  However, I do not know
how to get ‘the Gwyddion bundle’.  I suppose using
CFBundleGetBundleWithIdentifier() with the correct bundle ID.  What is
the correct bundle ID for Gwyddion?  I have no idea.

Regards,

Yeti


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to