psychopy/psychopy — pull request #748 by alexholcombe (2014-12-03 04:57:43+00:00)
Title: data.py had a bug in originPath

originPath was not returning the calling script. Instead it was returning the path that includes data.py! I realize that one would expect

inspect.getouterframes(inspect.currentframe())[1][1]

to return the file one up, but somehow (eg in demo_trialHandler.py) it was returning data.py. In other words, rather than one's code being saved in the "origin" field, the contents of data.py were being saved. I discovered that the first TWO entries in the inspect object, indices 0 and 1, were both the data.py path. The second entry, [2], contains the calling script. Tested in the stand-alone psychopy only.