Recently I have been using python to generate helpful post-processing graphics. Therefore I used the modul matplotlib. Yet the scripts can't be run directly from adams, always needed to compile these py-scripts into an .exe. Does anybody know how to tell adams to use the installed matplotlib library, or will it be a standard package in a next version?
Matplotlib is nice, isn't it? I will put a request into our feedback system, asking that we include Matplotlib in a future release. If you have another installation of Python on the same machine that is the *same* as the Adams version then you might be able to do this in your script:
sys.path.append('/location/of/matplotlib')
that works for simple modules, but I'm not sure it's enough for an entire package.
Regardless, that's how you would add to the search path for Python. I've used that in the past and have been happy with the results, hopefully that is an option for your project..
Note that that is *beta*! It does not appear to work in v2017.1 (we have a defect report on this already) and v2017.2 (I wonder if it might work here. Doesn't appear to.).
Anyway: just FYI in case you want to install it in a future version.
I'm using Kents first advice to import the module xlrd (xcel file read/write) and it just works fine.
In my case I have put it beneath a plugin-directory and on plugin load I just call
sys.path.append('<my_plugin_path>/xlrd_1_0_0')
Don't forget to cleanup after work, i.e. to issue a
sys.path.remove()
when you're done (in my case on plugin unload).
Concerning adding "everything" to the MSC Python installation:
Yes, on one hand it's convenient for us users, but on the other MSC has to kind of guarantee that everything works (i.e. do regression testing).
If they start adding everything available in the Python world they soon would be occupied with just testing the Python part of ADAMS.
Maybe they should query a set of experienced users or the Forum for commonly used stuff and just add the most used modules like they did with scipy/numpy in the past.