I have never used Python before, most of my programming has been in MATLAB and Unix. However, recently I have been given a new assignment that involves fixing an old PyEPL program written by a former employee (I’ve tried contacting him directly but he won’t respond to my e-mails). I know essentially nothing about Python, and though I am picking it up, I thought I’d just quickly ask for some advice here.
Anyway, there are two issues at hand here, really. The first is this segment of the code:
exp = Experiment()
exp.setBreak()
vt = VideoTrack("video")
at = AudioTrack("audio")
kt = KeyTrack("key")
log = LogTrack("session")
clk = PresentationClock()
I understand what this is doing; it is creating a series of tracking files in the directory after the program is run. However, I have searched a bunch of online tutorials and can’t find a reference to any of these commands in them. Maybe I’m not searching the right places or something, but I cannot find ANYTHING about this.
What I need to do is modify the
log = LogTrack("session")
segment of the code, so that all of the session.log files go into a new directory, separate from the other log files. But I also need to find a way to not only concatenate them into a single session.log file, but add a new column to that file that will add the subject number (the program is meant to be run by multiple subjects to collect data).
I am not asking anyone to do my work for me, but if anyone could give me some pointers, or any sort of advice, I would greatly appreciate it.
Thanks
I would first check if there is a line in the code
This could easily explain why you can call these functions (classes?). It will also tell you what file to look in to modify the code for
LogTrack.Edit:
So, a little digging seems to find that
LogTrackis part of PyEPL’stextlogmodule. These other classes are from other modules. Somewhere in this person’s code should be a line something like:This means that these are classes specific to PyEPL. There are a few ways you could go about modifying how they work. You can modify the source of the
LogTrackclass so that it operates differently. Perhaps easier would be to simply subclassLogTrackand change some of its methods.Either of these will require a fairly thorough understanding of how this class operates.
In any case, I would download the source from here, open up the code/textlog.py file, and start reading how LogTrack works.