Can compiled MATLAB into python library find its own directory?

조회 수: 2 (최근 30일)
Software Developer
Software Developer 2019년 9월 10일
I appreciate any input you all might have. The answer might be in MATLAB or Python and I'm pretty new to Python so I might be missing something obvious.
I compiled a MATLAB application into a Python library using the Compiler SDK. This library uses a config/prefs file to save the user settings. The problem that I am running into is loading the config/prefs file no matter where the library is installed, some users run Python localy, others run it as a virtual environment (Anaconda) and others want to deploy the library as part of another app.
This means that the install command (below) is sometimes never ran and the files are simply copied into a new location as part of a larger library install.
python setup.py install
The way I am hoping to solve this is to find the location of the .ctf file and keep the config/prefs file there, but I am not sure how to relialby and quikcly find the locaiton of the .ctf file. I am open to other suggesions, the library must have a config file becuase it's also used by the main application. Again, any input is much appreciated.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Call MATLAB from Python에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by