Can compiled MATLAB into python library find its own directory?

2 visualizaciones (últimos 30 días)
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.

Respuestas (0)

Categorías

Más información sobre Call MATLAB from Python en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by