nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

lipd.readLipd.py needs improvement -- here's some simple things! #37

Closed chrismheiser closed 6 years ago

chrismheiser commented 6 years ago

@ericsteig writes:

The default for lipd.readLipdshould be to expect a filename, not open a GUI.

*The path should by default assume './'.

Details:

The default for lipd.readLipd is to open a GUI (which I would never want). Also, the GUI doesn't open on my machine. I don't care since I'll never use it!

I have a lipd file called GISP2.lpd. If I'm already in the right directory, I should be able to read it with:

D = lipd.readLipd('GISP2.lpd')

but that doesn't work. I have to say:

D = lipd.readLipd('./GISP2.lpd')

which just is silly.

chrismheiser commented 6 years ago

I fixed the issue with the "./" You don't need it to call a file in your current working directory anymore.

We decided to keep the current use of the GUI as the fallback when the function is called with an empty "usr_path" parameter. If someone wants to open a file directly, then they can provide pass that path to the function call which circumvents the GUI.